1. How to make a mapped field inherited from a superclass transient in JPA? stackoverflow.comI have a legacy schema that cannot be changed. I am using a base class for the common features and it contains an embedded object. There is a field that is ... |
2. [Hibernate]Merge transient object with childrens stackoverflow.comI've some probleme with merge. My update method works in this way:
My classes:
|
3. Create a persistent object using a transient one stackoverflow.comI have 2 mappings like this:
|
4. Hibernate: Transient table mapping? stackoverflow.comI have a table
|
5. Hibernate's session.update(obj) method makes child objects transient (in parent/child relationship) stackoverflow.comI have a parent-/child relationship of folders, which looks like this:
A folder can have 0-1 parent folders.
A folder can have 0-n child folders (subfolders).
Using Hibernate, I call |
6. NHibernate transient object exception stackoverflow.comI want make an insert in the table EmployeebyProject, when try to insert throw the transient object exception. Table EmployeebyProject : {PK: EmployeeId, PK: ProjectId, DateBegin, DateEnd} This is the mapping:
|
7. Mapping calculated field from sql-query to transient attribu forum.hibernate.orgString sql = "select *, ( 6371 * acos( cos( radians(latitude) ) * cos( radians( :lat ) ) * cos( radians( :long ) - radians(longitude) ) + sin( radians(latitude) ) * sin( radians( :lat ) ) ) ) as distance" + " from Restaurant res where res.status = 1 and " ... |
8. Natural-id and how to save transient children on it forum.hibernate.orgI have a parent-object with some children-objects in an array. I have defined an natural-id on some of the properties of the child, so the children will be unique. Both parent and child have an id-property. When I save the parent some of the children will be transient but in the database already if you look to the natural-id. So if ... |
9. Saving transient parent with transient children forum.hibernate.orgAnthony posted this response to a recent question related to mine. I am doing the child.setParent( parent ) and parent.addChild( child ) thing but outside of a session. I expect hibernate to persist the parent first followed with the children but instead I get the "unsaved transient" error. ********************* Transaction trx = session.beginTransaction(); Parent stephen = new Parent(); stephen.setName("Stephen Earl"); session.save(stephen); ... |
10. Mapping transient properties forum.hibernate.orgHowdy, I'm using Hibernate 2.1.8, JDK 1.4.2 and Oracle9i. I've been scouring the documentation, tutorials and hibernate action book and can't find a way to do the following. Any suggestions would be appreciated. Let's say I have the following two persistant classes which I can map to the database. With the exception of the companyName field in User. Class: Company - ... |
11. Problems deleting a transient object mapped with entity-name forum.hibernate.org |
12. Override fields to transient forum.hibernate.orgHi, I would like to know if it is possible to override a embedded field (and also a parent class field) to turn it transient. The use case is: Code: @MappedSuperclass @Embeddable public class Person { private String name; private Date dateOfBirth; ... @Column(name = "NAME") public String getName() { ... |
13. Problem saving Transient Parent and Children at once forum.hibernate.orgHi there! Im having some problems with the persisting of transient objects with a collection of other transient child objects. Maybe someone has seen this before and can open my eyes. For the introduction, Im using the Spring Framework and Hibernate 3.2 to persist objects with the following relationship. Really basic! Code: |
14. Using a mapped object in a transient method? forum.hibernate.orgpublic class A { private Long id; private String s; private Integer i; private B b; [...] getter and setter @ManyToOne(optional = false, fetch = FetchType.EAGER) public B getB() { return b; } @Transient public ... |
15. persistent parent and transient child save forum.hibernate.orgI have parent and child with cascade all . In my case I open session, load the parent create a new child (this is transient) and add this child to parent and call save , I was hoping that hibernate would generate the PK for the newly added child , but it did not , it is generating only after flush ... |