Detached 2 « Map « JPA Q&A





1. Detached Object Collection problem    forum.hibernate.org

Author Message javacoda Post subject: Detached Object Collection problem Posted: Fri Oct 15, 2004 2:16 pm Regular Joined: Fri Jul 16, 2004 3:04 pm Posts: 52 Location: Wiltshire UK Hi All, I am reposting this as my previous post http://forum.hibernate.org/viewtopic.php?t=935351 seemed to get truncated. Is there a size limit for posting to this forum? In my unit test below ...

2. Detached collection modification    forum.hibernate.org

Hibernate version:2.1.6 Name and version of the database you are using:Oracle 9 Have I missed some fundamental mapping concept here, or is Hibernate completey incapable of dealing with modifications to detached objects that contain collections (like most object graphs) ? I have a web app, domain/data objects loaded on the EJB tier using Hibernate. I have to detach the object graph ...

4. Problem updating detached parent-child relationship    forum.hibernate.org

Hi guys, I have a class modelled as a parent-child relationship (using one-to-many) and marked as cascade="all-delete-orphan". Because of the database structure, the primary key of each child is a composite identifier consisting of the parent id and the line number. The parent and child classes all extend a PersistentObject class that correctly identifies to a hibernate Interceptor whether that instance ...

5. utility method to check if an object is transient/detached    forum.hibernate.org

Hi, Is there any utiliity method in hibernate which can quickly determines if an object is transient or detached (similar to JDO's PersistenceManager.isTransient(), etc). I know you can use an object's id to determine it, but it requires some knowledge of the object (i.e. access the id field or the POJO's getID() method). What I am looking for is some utility ...

6. Deleting objects from collection while detached    forum.hibernate.org

I searched around a bit and could not find this exact situation in the forums. One thread was close http://forum.hibernate.org/viewtopic.php?t=928459 but there was some copying of collection elements going on which confused the issue. My question is much more straightforward. Given this scenario: - load parent and initialize a one-to-many collection of children in session 1 - close session 1 - ...

7. Desnecessary update from a detached object , how to avoid ?    forum.hibernate.org

Scenario : I get the parent from an internet session , and i pass it to a session to persist with a new child. There is a way to add a new child to an existing parent without updating the parent after insert of a new new child !? If i lock the parent , hibernate says that an object is ...

8. Getting objects to refer to detached objects    forum.hibernate.org

I want the objects that I query out of the database to reference the read only objects and not new copies of the read only objects. If I do not lock the read only objects to the session and I query via hibernate for some other object that is supposed to reference the read only object Hibernate will create a new ...

9. all-delete-orphan with detached objects    forum.hibernate.org

Hi, My application has a web ui with a long form showing parent object information and multiple children objects (with one-to-many association). The application is supposed to update, insert and even delete one or more children objects if the user clears all their fields. I am using detached objects. Although I can persist newly created children objects as well as changes ...





10. Dirty Checking for detached object    forum.hibernate.org

I am aware of hibernates Automatic dirty checking capabilities if the entity is loaded and modified in the same session. But how does this work in the case of detached instances. What we do is load the object in one session close it and save the same with a different session after the object returned from the web tier. The problem ...

11. Session per request with detached objects and legacy data    forum.hibernate.org

AFAIK, the version field will be stored in the database. For legacy data, this is often not an option. What I mean, is a field that is not stored in the database, but calculated at retrieval and storage time from the data in the database. At storage time, the MD5 field of the POJO would be compared to the MD5 value ...

12. Updating detached collection fails to persist FK and index    forum.hibernate.org

Author Message kastor Post subject: Updating detached collection fails to persist FK and index Posted: Thu Mar 17, 2005 11:08 pm Newbie Joined: Tue Jan 04, 2005 4:52 pm Posts: 13 Hibernate version: 2.1.8 Hello All, I have a server and client database. The server contains the root of my object heirarchy. (A Sample and a Household) It is ...

13. problem when reassociating detached object more than once    forum.hibernate.org

Newbie Joined: Thu Sep 09, 2004 7:54 pm Posts: 4 I have a many-to-many relationship between classes/tables T1 and T2, and the relationship is represented by a class/table R: T1 <= R => T2 I created one row in table t1, two rows in table t2, and two rows in table r to link them. t1 (id = 1) <-- r ...

14. Detached object w/ lazy collections    forum.hibernate.org

Hibernate version: 2.1 Hi, I need some help with detached objects and lazy collections. The scenario is that an HTML form is built in the Web tier from a collection in a persistent object. When the form is submitted, changes are made to the (now detached) object; in particular, changes may be made to the collection (removal of elements and/or additions ...

15. What exactly constitutes a detached object    forum.hibernate.org

Read the rules before posting! http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version:3.0 Mapping documents:General Question While investigating how we would introduce hibernate persistence in our 3 tier application we are faced with a possible issue/dilemma. System is thick client and application server/servlet. Swing on the client and business logic processing and persistance will be on server. This is a current running system with ...





17. Saving Detached Object    forum.hibernate.org

you have inverse="true" on your association and that means its not the collection that is "controlling" the relationship. It is the many-to-one that is in charge and thus you should (as always) remember to null out that many-to-one too. Remember this is pure java and in java you need to manage your bidirectional relationships. You could also look at cascade delete-orphan ...

19. saveOrUpdate for detached objects    forum.hibernate.org

I have thew following scenario in a Web application: I'm loading a complex object graph, then close the session -- the loaded objects are now detached. The user edits some of the objects. Now I want to persist the saved objects back to the database -- it appears a cascading saveOrUpdate would be the best choice. However, according to the doc, ...

20. How to generate a new ID for an detached entity?    forum.hibernate.org

21. Session per request with detached objects    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.0.5 Mapping documents: Code: ...

22. Way to check if detached object matches Criteria?    forum.hibernate.org

I wondered the same thing about if it was in the cache. But given the example: Cat cat1 = session.save(new Cat("snowball",120)); Cat cat2 = session.createCriteria(Cat.class) .add( Restrictions.like("name", "snow%") ) .add( Restrictions.gt( "weight", new Float(100) ) ) .uniqueResult(); Is it possible that cat2 will be equal to cat1 without hitting the database, if all field comparisons are done in the database (no ...

23. detached objects and LazyInitializationException    forum.hibernate.org

I'm having problems with detached objects and LazyInitializationException on a Set with Hibernate 3. After having read through Hibernate in Action and tried every possibly combination of metadata, changing hibernate.max_fetch_depth, adding Hibernate.initialize( ) before closing the session etc, I started searching the web for more information on working with detached objects. On the web, I found several suggestions for workarounds: like ...

24. auto detached objects mode    forum.hibernate.org

Im in hibernate 3, and have a general question. If this is in the docs, kindly point me to which one. This is my understanding of how hibernate works (in pseudocode): 1. retrieve an object 2. edit the object 3. insert an object into the session 4. close and commit Both objects will get persisted to the DB (the one that ...

25. asymmetry between saving and deleting detached objects    forum.hibernate.org

Newbie Joined: Wed Aug 03, 2005 9:10 am Posts: 3 Hibernate version: 3.0.5 I am interested (out of curiosity) in your opinions about an asymmetry between saving and deleting detached objects. Concretely, in the context of Container Managed Transactions in J2EE Session Beans, there is a difference between session.merge() and session.delete() in the way a StaleObjectStateException is propagated. When deleting an ...

26. Working with detached Collections?    forum.hibernate.org

I would like to know, how in hibernate, can i reattach a detached Collection? I get a List from an HQL query. The list is then passed to a differenct class. How can i open a session in this class so that I can iterate into the list and not get session closed error? TIA.

27. How to update only a few columns of detached entity    forum.hibernate.org

I am new to Hibernate and I am getting stuck with a basic but tricky issue about Hibernate and ORM at all. Supose a have a system with a "Product" entity with properties such as "id", "description" and "price" among others. The Product entity is mapped to a default table Product with similar columns. Now, the tricky scenario: 1- the system ...

28. Merge of detached object with bad id causes insert?    forum.hibernate.org

In setting up some unit tests for my DAO, I came across strange behavior in Session#merge(). It appears that merging a detached object which has a non-existent primary key (where normally the keys are "natively" generated) causes the row to be inserted, ignoring the bogus primary key. Has anyone else noticed this behavior? This is undesirable since it could cause rows ...

29. Creating detached queries for HQL    forum.hibernate.org

I'm creating a three tier web application, where I create my queries on the web tier but execute them on the backend tier. As far as I'm using Criteria queries everything is fine. I create a DetachedCriteria, pass it to the BackendTier, add the session, do the query and get my result. But sometimes I would like to execute HQL queries. ...

30. detached objects and duplicate key    forum.hibernate.org

Author Message Cue Post subject: detached objects and duplicate key Posted: Thu Sep 29, 2005 9:08 am Regular Joined: Tue May 04, 2004 6:15 am Posts: 51 Hibernate version: 3.0.5 Mapping documents: OLIPort Code: ...

31. Session.merge(), detached objects, versions and primary keys    forum.hibernate.org

Hi, In my application I have a service that works with persistent objects. Nevertheless, I don't want to give clients of the service direct access to these objects since that would allow them to bypass the service and make changes to persistent objects directly (at least if the session is still open). Therefore, whenever I return a persistent object from my ...

32. hibernate updates unmodified detached objects insaveOrUpdate    forum.hibernate.org

Hibernate updates un-modified detached objects when we call saveOrUpdate method. I am using session-per-request-with-detached-objects pattern. (our application cannot use long term open sessions) I have two POJO's A and B having one -to - many relationship A - parent , B -children. NOTE : On an average A contains atleast 500 B's in its Set. On the UI side we will ...

33. Initialization of detached object in a cascade way    forum.hibernate.org

Hi, As I have seen in all forums, road maps,... there is nothing about having a new feature which allows the inialization of a detached object in a cascade way. More explanations: in the service layer, I want to work in a lazy mode. Sometimes, I need to pass fully initialized detach objects to my UI layer (all collections of collections ...

34. What is the detached instances?    forum.hibernate.org

35. Why can't you re-associate a dirty detached object?    forum.hibernate.org

I have an application which allows the user to edit a record over a long period of time. The record should not be saved to the database until a save button is clicked. Detached objects sounded perfect, but I have a problem. In various sessions after the one in which the record being edited was loaded I need to query/load other ...

36. updating the persistent state of a detached instance    forum.hibernate.org

Hey guys I am getting the infamous error could not initialize proxy - the owning Session was closed org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed When trying to update the persistent state of a detached instance . So here's what i do 1. Open session 1 query for an object in my case look for a HumanImpl ...

37. ClassCastException using detached objects over RMI    forum.hibernate.org

Author Message rickhoro234 Post subject: ClassCastException using detached objects over RMI Posted: Wed Dec 07, 2005 11:56 pm Beginner Joined: Wed Oct 15, 2003 1:31 pm Posts: 25 Problem Summary: I'm using detached objects with Hibernate. I have my application working in a single process architecture and am now trying to separate the client and server over RMI. When ...

38. entity was not detached on Merge    forum.hibernate.org

Bonus b = (Bonus) getHibernateTemplate().execute(new HibernateCallback() { public Object doInHibernate(Session session) throws HibernateException, SQLException { Query q=session.createQuery("From Bonus b where b.employee=1 AND b.year=2004"); ...

39. newbie: saveOrUpdate on detached object    forum.hibernate.org

hello, sorry for asking a basic question, but I have not found any answer for it anywhere... I have a detached object on which I have made alterations after the session was closed. The object contains a collection of other objects, and I have added one object to that collection. When I create a new session, do a saveOrUpdate on the ...

40. Session.save -> bean sholud be persisten but is DETACHED    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.1 Mapping documents: Code: Import

41. Detached object confusion    forum.hibernate.org

Beginner Joined: Thu May 05, 2005 11:12 pm Posts: 26 Hibernate version: 3.1 We have a rich object graph. Basically we have a Project, which contains ProjectResources and ProjectActivity's. When resources are assigned to the activity, the ProjectActivity contains ProjectActivityAssignment's. A ProjectActivityAssignment contains the reference to the ProjectActivity and the ProjectResource. The ProjectResource contains references to the Project and a Resource. ...

42. Hibernate Versioning and the Detached Objects    forum.hibernate.org

I am trying to implement the optimistic lock in my web application. I want to make this without column, with the automatic versioning. The Hibernate Reference says, "The application manipulates the state of detached instances originally loaded in another Session and then reattaches them using Session.update(), Session. saveOrUpdate(), or Session.merge(). // foo is an instance loaded by a previous Session ...

43. Saving a query for later use (maybe a detached criteria)    forum.hibernate.org

On a web UI, lets say the user can fill in values into fields to perform searching on items. (color, size, style..etc) After filling in the form, the user will then hit the search button to get the list of items that fits the search criteria. Now, lets say the user wants to save that search, so he/she can execute it ...

44. How to scale detached persistent objects in cluster?    forum.hibernate.org

Hello, "Hibernate in Action" suggests storing detached persistent objects (graph) in Http session. But to my knowledge, this will cause performance/scalability issue in a load-balanced server cluster with replicated session. This is because that session replication in clusters (e.g. Tomcat 5 cluster) is expensive and perform badly for large session objects. However, if you want to be able to route client ...

45. Re-persisting a detached object in a web app    forum.hibernate.org

I have a graph of objects ( a parent child relationship) that the user edits through a web screen. The objects are fetched through hibernate, and the session is closed, thus detaching the objects. After the user edits the objects, I re-persist the objects by calling session.update. When simulating this when testing my DAO, when I add children, I can see ...

46. Object identity and detached object    forum.hibernate.org

I'm a bit unsure of the discussion about object identity in the book Hibernate in Action (pg. 119). While it is understood that hibernate guarantees that two references to the same in memory object for the same identifier value are equal (in terms of address equality), but if I have a reference to a detached object, say, to record A, and ...

47. Question about detached objects and stale state exceptions    forum.hibernate.org

Hello all, I've got a question about how to deal with a StaleStateException. Let's say I start a session and grab a bunch of objects out of my DB like so: Session session = HibernateUtil.getSession(); Transaction transaction = session.beginTransaction(); Criteria criteria = session.createCriteria(MyObject.class); criteria.add("status", 1); List myObjectList = criteria.list(); and let's say the above returns a list of 100 instances of ...

48. Trouble with detached object and LazyInitializationException    forum.hibernate.org

Hibernate version: 3.1 I'm working on a web app built with in a basic MVC pattern. I had planned to use a session per request strategy with hibernate, however, i'm having some trouble. I've been reading up on session per conversation, but I don't see how it will address my issue. So, here it is: I'm writting a multi-page registration process. ...

49. Concepts Detached Objects and Long session    forum.hibernate.org

50. Persist an object with detached objects    forum.hibernate.org

Hi! How can i persist an transient object with detached objects? That means, I've got an transient address object which should be filled with the detached objects City and Zipcode. With the method merge it works, but I do not get the ID of the address object, but it is written to the database (with the method persist I'll get an ...

51. Problem on update() of detached object    forum.hibernate.org

I'm a new user of Hibernate (3.1.3). Used Elver to generate mapping file for an EMF model. Elver tutorial works fine. I then played around a bit. I retrieved a couple of objects in a session and then closed it. Then opened up another session and tried to reattach one of the earlier retrieved objects using update(). The cascading function tries ...

52. Best Practice - Detached and transfer objects    forum.hibernate.org

53. Regarding Detached Criteria in Hibernate    forum.hibernate.org

54. Why does Hibernate think this detached object is transient?    forum.hibernate.org

Author Message sundeepprakash Post subject: Why does Hibernate think this detached object is transient? Posted: Wed Jul 19, 2006 5:58 pm Newbie Joined: Tue Aug 03, 2004 5:42 pm Posts: 16 In the code shown below, in the first session, I try to read a Writer from db, then get the Books of the Writer (a one-to-many association from ...

55. Detached Objects: "a different object with the same....    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Overview: I am using detached objects (incorrectly) and hoping someone can offer some guidance. I have an object that has a collection of children (in this case it's the same type but that is irrelevant). I create the parent and the children, and cache the child as a detached object. In ...

56. extended session and detached session    forum.hibernate.org

57. cascade="save-update" with transient and detached    forum.hibernate.org

Newbie Joined: Wed Aug 23, 2006 11:23 am Posts: 1 When using cascade="save-update" in a many-to-one relation, I get different results with transient and detached objects. In this case the table permission has a many-to-one relation to the table operation. I'm having a permission object in detached state. This object is modified by calling the setOperation method of permission (many-to-one relation). ...

58. How to make an object detached without session closing?    forum.hibernate.org

Have tried the evict method, it didn't help. Even after Session.clear() I get the exception "Illegal attempt to associate a collection with two open sessions". I'm trying to copy an object from one database into identical one. I can get an object from session A, iterate it for fully initialization (it is a lazy object) but can't detach it from session ...

59. Hibernate always uses db id to see if an obj is detached???    forum.hibernate.org

Hi Does hibernate always use the database identifier to figure out if an object is a detached one when I try to update an object thats present in the database? Is it possible for hibernate to use the java equality for that??? Okay, here is my problem. I have an object passed to the presentation layer for any edits to it ...

60. not transient, and not detached...    forum.hibernate.org

The attribute of the main object is instanciated (so not null), it exists in the database but it doesn't come from Hibernate (I did no explicit 'find'). Hibernate sees it as transient, but it exists already in the database! So, what is the way to save my main object, wihtout doing a 'find' of my attribute on his unique key so ...

61. Detached Example / Native SQL query support classes    forum.hibernate.org

I've searched for something similar to DetachedCriteria for a query-by-example (QBE) that uses an instance of Example (to get the functionality of ignoreCase, enableLike, etc.). There does not appear to be a DetachedExample class, which would allow a third tier client to formulate a query using an Example. The Example class is not easily extended... and there does not appear to ...

62. Flash Remoting - Detached Object    forum.hibernate.org

63. Help with Detached Criteria    forum.hibernate.org

Hibernate version: 3:0 I am having problems in using Detached queries. This is the scenario I have A is the parent class A has a collection of Bs B has a collection of Cs C is a collection of classification objects which is referenced through a Xwalk table. I am trying to do something like this. I have a main Criteria ...

64. Help with Detached Criteria    forum.hibernate.org

Hibernate version: 3:0 I am having problems in using Detached queries. This is the scenario I have A is the parent class A has a collection of Bs B has a collection of Cs C is a collection of classification objects which is referenced through a Xwalk table. I am trying to do something like this. I have a main Criteria ...

65. ManyToMany not persisting detached with 3.2.1 works in 3.2.0    forum.hibernate.org

I'm having a problem with ManyToMany merging with 3.2.1 that worked just fine in 3.2.0. I can literally switch out the 3.2.1 jar with 3.2.0 and see it work. I have a many to many relationship between Animals and Countries. Animals is the owning side. If I modify the entries in Animals.countries and do a merge the countries are correctly merged ...

66. Problem with setting a collection to detached object    forum.hibernate.org

@Entity @Table(name="T_EVENT") public class Event { private List plans; // ... truncated @ManyToMany( fetch=FetchType.LAZY, cascade={CascadeType.PERSIST, CascadeType.MERGE} ) @JoinTable( ...

67. how to get oldvalues(detached obj without using select query    forum.hibernate.org

Hi All, Hibernate version:3 DB:IBMDB2 I need to maintain history . I am using merge in my project for save and update.In merge function select query is also happening for update so it becomes performance issue how to avoid select query at the same time i need oldvalues could anyone help me? Thanks in advance, Selvaraj

68. Deleting Detached Objects    forum.hibernate.org

Newbie Joined: Fri Sep 29, 2006 4:30 pm Posts: 7 Hibernate version: 3.2 GA Mapping documents: Annotations Name and version of the database you are using:MySQL 5 Hello, I ran into some issues while deleting detached objects. Although i've already found a workaround i would like to be able to understand exactly what i was doing wrong. Basically i have a ...

69. Detached hql queries    forum.hibernate.org

70. Updating a detached instance    forum.hibernate.org

Hi I have two methods one to get a persisted object and one to update a certain value of an object, like below private ClassA getByPrimaryKey( int id ) { LOGGER.fine( "Looking for ClassA entry with primary key " + id ); ClassA retrieved = null; Integer primaryKey = new Integer( id ); Session sess = sessionFactory.openSession(); try { sess.beginTransaction(); retrieved ...

71. IllegalArgumentException: Removing a detached instance    forum.hibernate.org

Newbie Joined: Wed Jun 28, 2006 3:32 pm Posts: 16 The test case at the bottom of the stack trace clears the member collection in SortContext and then persists the SortContext with a remote call to the JBoss server. When I use EntityManager.merge() to persist the SortContext, everything works fine. But I need to use Session.saveOrUpdate() (I get the Session from ...

72. associations between detached entities.    forum.hibernate.org

Hi! Using Hibernate3+EntityManager(for every HTTP query, a new EntityManager instance is created) My problem is basically the same described by someone here: http://forum.java.sun.com/thread.jspa?t ... &tstart=90 To sum up: I've got entity A and B. There is a many-to-many relationship between them (B is the owning side, A is the inverse!) At the beginning of my UI code, I start out with ...

75. detached entity passed to persist - Whats wrong?    forum.hibernate.org

Beginner Joined: Sun Sep 04, 2005 3:10 am Posts: 24 Location: CH Hello, is somebody able to explain that error to me. It is a mickymouse application and I am not able to get it right. I always receive the error "detached entity passed to persist". What does it mean? What have I done wrong? Please help. Thankyou, chk Hibernate version: ...

76. How to discard changes on detached objects?    forum.hibernate.org

Hi I am writng an eclipse RCP and my objects are detached most of the time. i only call an update when I want to save an object. But how can I reestablish the persistence from the database for a single, detached object? This would make my code much easier when the user discards the changes made to an object. Thx ...

77. two persistence units and detached entities    forum.hibernate.org

Hi; I have two persistence units each representing two different schemas. These schemas have the same tables. The aim is to gather default entity values from the first persistence unit, and store the persistent entities on the second persistence unit. Here is how i try to mange this purpose: EntityManagerFactory factory = Persistence.createEntityManagerFactory("firstpersistenceunit"); EntityManager em = factory.createEntityManager(); myEntity = em.find(MyEntity.class, 1); ...

78. Detached query with filters on association fields    forum.hibernate.org

Hello, I have a problem with a DetachedQuery, which seems to be in contrast with Hibernate's documentation. I'm using Hibernate 3.2 + Spring integration, and my datamodel looks like this: - class PersonData: - id, etc... - contactDetails: ContactDetails - class ContactDetails: - firstName, lastName, etc.. I have a PersonDao class with a findByName() method, but it throws an exception when ...

79. Updating DB with detached objects    forum.hibernate.org

Hi, Im having a problem with updating my DB with detached objects that have been edited. I have looked extensively through the forum archives for someone with similiar issues and although they have appeared I havent seen any replies which could help. I have an application which reads in XML documents into an Object Graph and persists them into a DB ...

80. Help with detached objects, HttpSession, and thread-safety    forum.hibernate.org

Newbie Joined: Fri Jun 15, 2007 4:16 pm Posts: 2 Hibernate version: 3.2.0.ga (My apologies if this has been discussed before. I did extensive searching and didn't find anything that quite answers my question. If there is something, pointers are very much appreciated.) I'm new to Hibernate and am currently struggling with how to best integrate it into the servlet application ...

81. PersistentObjectException: detached entity passed to persist    forum.hibernate.org

I'm trying to do a simple persisting of an object into a MySQL database , with the following code: Code: public static void main(String[] args){ EntityManager em=JPAUtility.getEntityManager(); List existing =em.createQuery("select u from UserBean u where u.userName='foo' and u.password='bar'").getResultList(); if (existing.size() == 0) { ...

82. persistent the detached object with regenerate id(insert).    forum.hibernate.org

I want to persistent the detached object which have lazy loding collection of child objects (bag , cascade=all) with regenerate identifier. (I want to do this for all object in my Webapp) For example the database is like this. PARENT TABLE ID | NAME ------------------- 1 | hoge CHILD TABLE ID | P-SEQ | NAME ------------------ 1 | 1 | foo ...

83. Advice on updating from partial detached object    forum.hibernate.org

I'm looking for advice on the correct way to update from a partial detached object (a set of data points that include the version from the original object). Let me start by explaining our requirements, then how we have found to do it currently. Because of the way our application is built, we are passing data up to a form on ...

84. Help with detached object merge    forum.hibernate.org

Hibernate version: 3.2.4 I'm working on a solution which pulls data from an foreign XML source into objects which are then persisted in the database. The XML is simple: Code: OK, so this XML maps to a Data object which contains a Set of ...

85. detached criteria api    forum.hibernate.org

I am not sure, if criteria all already translated into HQL. I saw a discussion once but haven't checked since then. I cannot see the advantage to separate things. You will need the mappings twice (Hibernate + other solution). I don't think that other solutions are more "lightweigh" copying resultsets into properties than Hibernate.

86. [Hibernate/JPA] Detached entities not properly recognised    forum.hibernate.org

Newbie Joined: Thu Apr 27, 2006 4:56 am Posts: 12 I have 2 entities, that uses a manually assigned string ID, using UUID like this: Code: @Id @Column(length=36) protected String id = UUID.randomUUID().toString(); The 2 entities: User (which represents a user, with no relation to other entities) Collection (which represents a collection and has a @ManyToOne relation with user). If I ...

87. Simple Detached Object question    forum.hibernate.org

88. Violation of unique key -> detached entity passed to pers    forum.hibernate.org

Beginner Joined: Tue Mar 13, 2007 8:26 am Posts: 25 Hello, I'm having problems when retrying to insert a new record in database. I do a persist and when the container (CMT) commits the transaction they throw one RollbackException. Then, I catch this exception and try to insert again. But, this exception is throw: Quote: org.hibernate.PersistentObjectException: detached entity passed to persist: ...

89. Synchronizing 2 detached objects in a very long conversation    forum.hibernate.org

I have a design issue i am not sure about. i have a hibernate object i use in various threads. i am fetching the same object from the database and since it is done in different sessions they are allocated with different JVM ids. I put both objects (which should reflect the same object in the database) in different sets. My ...

90. Detached Object Confused?    forum.hibernate.org

public class Event { private Long id; private String title; private Date date; public Event() {} } public class Person { private Long id; private int age; private String firstname; private String lastname; private Set events = new HashSet(); public Person() {} // ...

91. Removing a detached instance (simple example don't work) !!!    forum.hibernate.org

Hi, I have one simple test class for the most simple Person class, like this: Code: public PersonTest { private static EntityManagerFactory emFactory; private static EntityManager em; private Person person; @BeforeClass public static void init() { BasicConfigurator.configure(); ...

92. Update of detached objects in the database    forum.hibernate.org

Newbie Joined: Wed Mar 26, 2008 4:47 am Posts: 1 [a]Hibernate version:3.1.1 [b]Name and version of the database you are using:PotgreSQL1.8.2 We have a multi-screen application, which contains a multi-step wizard. The application is a Spring MVC and Webflow application having multiple wizard-like pages. The application maintains conversational state with the screen. On each step of the wizard, we update the ...

93. Infinite loop while merge()ing a detached object    forum.hibernate.org

Hibernate version: latest Mapping documents: Code:

94. Strange Detached Entity Persist Problem    forum.hibernate.org

Beginner Joined: Fri May 21, 2004 5:22 am Posts: 24 Note: The update and select operation is working. Hibernate version: 3 Mapping documents: Code: ...

95. Could not find detached object, need help here please.    forum.hibernate.org

Author Message gigsvoo Post subject: Could not find detached object, need help here please. Posted: Tue Apr 29, 2008 2:39 am Beginner Joined: Fri May 21, 2004 5:22 am Posts: 24 Hibernate version: 3.2.4 shipped with JBoss AS 4.2.2 Mapping documents: Code: