I have one to may relationship on my obejct model. one summary can have many details. I have inverse =true set on details.so this association is owned by detail class. Now my question is, i have already eagerly loaded summaries( with details fetched). Is it ok to only save summaries and not details because details are not updated?? I am afraid becuase of the inverse=true on details.
Is there a way to maintain relationship with the tables..
Lets say Employee and Department table are linked with dept id .. Is it possible to detect the foreign key from the metadata and indicate flag in front end on the table's column to indicate that this column is foreign key so make sure for dependency with the parent table?? any thoughts..
producGroup has many products ...<set name="products" ...>
so running the above queries it also tries to load all the products..That is ok with me but i want it to be loaded in singel query instead of individual select statements ... How do i wrote the above query so it also load all products while loading the product group instead of running n times select for each product whicle referring the collection products.
I have one master table lets say staff with staffID and 6 other tables are using the staffID along with their data.. Does that mean that my staff table mapping will have <set> ( assuming theres one to many relation ) element for all 6 tables ...How do i decide whether it hsould be bi directional asociation or uni direction association and what i have to do in mappings to ensure its implementing association properly .. please give me an example to clear this doubt as i am new to hibernate and this associations confuse me a lot...
can any one give me some good article about defining the relationship - associations for the classes/mappings. Does the Assciations make difference while loading up the whole object graph .. How to distinguish whether uni directional association is needed or Bi directional ??
It uses HibernateDAOTemplate to handle the session..Hibernate runs lot of sql statements in the beginning and traverses the whole object graph ( parent -child ) and retrieves all of the objects.. My problem is that i tried to make it lazy ..tried to set up the batch size but all things ended with exceptions ...if i make all mappings lazy then i am getting Session Closed exception ..I am seeing the call in web service at this point..and it looks like some thing is triggered outside the context..for the batch size setting .. I am getting XYZ object not found at runtime...My question is what should i do to improve the performance and what guidelines i should follow ..I don't know much about Hibernate -Spring