Iam reading this book "Java persistence with Hibernate" and trying to summarize my understanding of Hibernate association mappings.So,to my knowledge, these are the questions I would ask when writing the mapping files.
1)Is the attempt, to map one & many valued relationships between Entity classes or between Value type classes? 2)Does the class being mapped, contain a collection 3)If it does, is the collection,
-- a)A collection of value-typed instances (either JDK type or custom value types) or references to value type. OR b)A collection of Entity references
What other questions would I have to answer before I can proceed to write the mapping file?
[ June 26, 2008: Message edited by: randy pausch ]
[ June 26, 2008: Message edited by: randy pausch ] [ June 26, 2008: Message edited by: randy pausch ]
Really, your mapping files should be a very natural elution from your object model.
So, does your object model have natural associations? Is one object associated with another. Can one object contain many instances of another object? Are the relationships uni or bi-directional?
These types of answers should come right out of the object model, or domain model that your are designing. From there, it's just a matter of mapping those natural, object oriented relationships to your database structure.
Joined: Jun 26, 2008
Now I see why a good understanding of UML is crucial.
This is why, I love the ranch. There's always someone who helps.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com