save « Load « JPA Q&A





1. Map different entities to the same table, always saving as one entity and loading depending on the context    stackoverflow.com

I'm trying to make my domain clear by using different entities in different contexts. At the database, these entities will be persisted in the same table. I have the following class ...

2. Is it possible to load a collection but not save it in Hibernate    coderanch.com

When I load Parent I want to load the children set, but when I want to save Parent I don't want to save the children.

3. Saving resources! Not loading collections.    forum.hibernate.org

Lets suppose I have a parent child relationship 1 Parent -> n Children If I want to edit the Parent, I would not load all his children (I just want to set some fields). Since Parent.getChildren() == null, does Hibernate kills all the relationship when I update the object? Suppose also that 1 Parent has 1,000,000 children, and I want to ...

4. How save child without loading parent?    forum.hibernate.org

5. Unable to load the most recently saved object    forum.hibernate.org

Hibernate version: 3.0alpha Mapping files: true 0 true true pool1 org.hibernate.dialect.MySQLDialect com.mysql.jdbc.Driver jdbc:mysql://192.168.0.151/c2iedm_adam root 1 true false

6. Repeatedly load & saving the same persisted object    forum.hibernate.org

I am trying to write a simple incremental counter: I have a very simple object that contains just an int for the database ID and a long for the counter. It has a getNext() method that increments the int and returns it's value. I also have an EJB (Stateless session bean) that: - loads this simple object from the database, - ...

7. Problems after loading and saving object with association.    forum.hibernate.org

PlatformManager platformManager = new PlatformManager(); // Clean the DB platformManager.deleteTables(); // Create the main bean PlatformInfo platformInfo = new PlatformInfo(PLATFORM_KEY); // Create the associated bean and assign it to the "father" ContainerProfileInfo profileInfo = new ContainerProfileInfo("profile1"); platformInfo.addContainerProfile(profileInfo); ...

8. Issue loading / saving set    forum.hibernate.org

Newbie Joined: Tue May 16, 2006 4:26 pm Posts: 5 I am having a strange, to me, error saving or loading a set. What I am doing works perfect with a different set of classes, but when I do it here I get a null value from getItems() , and new items don't get their fk set. I am using the ...

9. saving an object does fail, loading objects works? plz hlp    forum.hibernate.org

Hi all, well, I`ve got two really simple classes which I wanna make objectrelational with a MySQL-database - whilst reading objects ain`t no problem, writing them causes a "NULL" entry for the foreign key. To understand what I`m starting off from, here`s the mapping: Customer.hbm.xml: ...





10. save/update/load strategy joined-sublclass    forum.hibernate.org

Newbie Joined: Wed Jun 29, 2005 5:40 am Posts: 7 Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version:3.13 Mapping documents + POJOS + Database tables : ...

11. Listener for saving and loading objects    forum.hibernate.org

12. Hard issue: Save as New an Entity linked to lazy load stuff    forum.hibernate.org

Hi all, I have search an answer for a while and I didn't found any good way to do it. I have a complex object, a Deal, that need to be inserted as new at each modification (versionized instead of updated). All modification to the instance and the instance linked to him must also be save as new instead of "updated". ...

13. Parent/Child loading/saving    forum.hibernate.org

14. Lazy Loading and saving objects    forum.hibernate.org

In order to make our retrieval of a particular object more efficient, we declared the associations of this particular object to be declared lazy. This improved the performance of object retrieval, but caused the saving of new versions of the same object to be slowed. Please note that the associated objects were already in the database. Could you please explain why ...

15. lazy loading and saving    forum.hibernate.org

Hi I have an object A that contains a list of object B and B contain a list of object C. Im doing some lazy loading. I get my object A and all the lists of object B. I don't need to get C. When saving, all C related to B are erased. How can I save A & B without ...

16. Many-To-Many not saving, but loading fine - typo?    forum.hibernate.org

I know I've done a million times, but this many-to-many isn't saving. I'm using hibernate 3.3.1ga with spring 3.0.0m4. Code: @Test public void save() { Job job = new Job(); ... job.addCategory( categoryDao.find( 1 ) ); ...