I am facing a problem when mapping domain classes to a database table in hibernate.
I am following a domain driven approach, so a class would look like this:
Now, is there a common way to map domain values to their corresponding database columns?
what i have done so far is using the <component> element like this
and this works. however, i also use domain values for id properties that are usually mapped like this:
this expects a primitive id type, such as Long. However, if I used the type MessageID as a domain value, i don't know how to do the mapping, as the component element does not support an id element in it's body.
Hope somebody can help.
JDBCSupport - An easy to use, light-weight JDBC framework -