Hello.
I'm currently on a project who will probably use hibernate for the O/R mapping. Its quit a first time for everyone, and we stumble among some question about the best approach to use.
Some information about the situation :
- We have a small (50-60 classes) but rich domain model (including heavy use of wrappers and delegation, custom collections, inheritance...), who is well advanced (we're finalizing it). In other words, the model has been created with respect to the business rather than in perspective of its future persistence, and is so heavily object oriented.
- We have created the database schema, who is somewhat smaller and simpler (30-40 tables). Same approach here, we've conceived what we think was the simplest and most efficient relational structure who should be able to represent all the OO model data.
We are know wondering about the best way to map the two. My questions are summurazied here :
- Is this approach (first, the OO model, second, the database schema, third the mapping) OK to use with Hibernate ? We know that the mapping is "conceptually possible", but that in some case it could be tricky (one class to several tables, several classes to one table, generally complex links between tables and classes), and we lack the expertise on the tool to assert if this is even possible.
- If not, as the OO model is the core of the system and should stay as it is, what would be a good approach, starting from there, to conceive the mapping and the related tables ?
Thanks and regards,
Martin Van Aken
|