Hello,
It clearly seems there is a problem synchronizing the tag <composite-element> as reported in several threads on the Hibernate Synchronizer forum, i.e.
(Aug 19, 2005)
http://www.eclipseplugincentral.com/PNphpBB2-viewtopic-t-2159-highlight-compositeelement.html
(Jul 20, 2004)
http://www.eclipseplugincentral.com/PNphpBB2-viewtopic-t-461-highlight-compositeelement.html
(Mar 25, 2004)
http://www.eclipseplugincentral.com/PNphpBB2-viewtopic-t-90-highlight-compositeelement.html
(Jun 21, 2006)
http://www.eclipseplugincentral.com/PNphpBB2-viewtopic-t-3518-highlight-compositeelement.html
The problem is the "class" attribute of tag <composite-element> is not taken into account, unless you copy/move it to the appropriate collection containing tag (e.g. <set>, <map>, <list>...)
Having something in a class mapped like:
<set name="myElements" table="MY_TABLE" cascade="all">
<key column="MY_ID" />
<composite-element class="MyElement">
<property name="value" column="VALUE" type="long" not-null="true" />
</composite-element>
</set>
generates the following Java code in the corresponding class member:
private java.util.Set<null> myElements;
which is indeed WRONG.
Logged In: YES
user_id=731522
Originator: YES
Note that the above mentioned work-around (copying/pasting the class declaration to the <set>) makes the corresponding *.hbm.xml NOT passing the XML Validation, because of the Hibernate DTD not allowing such an attribute ("class") in a <set> declaration.