| Author |
Message |
|
|
|
Post subject: composite-element causes invalid generic
Posted: Aug 19, 2005 - 06:54 PM
|
|
Joined: Aug 19, 2005
Posts: 3
|
|
I have a list defined something like this:
| Code: | <class name="com.me.Foo" table="foo">
<list name="items" table="items">
<key column="foo_id">
<list-index column="item_num">
<composite-element class="com.me.Item">
<property name="xyz" type="string"/>
</composite-element>
</list>
</class> |
Hibernate Synchronizer generates the com.me.Foo and com.me.Item classes. However, the Foo class contains the following:
| Code: | // collections
private java.util.List<null> items; |
Which is obviously not right. If I change the <list> tag to
| Code: | | <list name="items" table="items" class="com.me.Item"> |
then Hibernate Synchronizer generates the correct output, but unfortunately <list> doesn't take a "class" argument according to the Hibernate 3 DTD, so I can't leave that in there.
Is there a way to make this work, or do I have to let my mapping file and the generated code go out of sync? |
|
|
| |
|
|
|
 |
|
|
| |