Hi!
I have a hibernate mapping file with a bean "
SectionPlan" which has a composite ID split into a separate class "
SectionPlanId".
Now I have injected extra class code into the bean using the "class-code" meta tag. No problem so far.
But if I generate the actual bean class code using hbm2java, it injects the "class-code" from the meta tag into
both the "
SectionPlan" AND the "
SectionPlanId" code.
How can I control wether meta class code goes into the ID class as well?
Any kind of help would be appreciated:)
Thanks:)
Cheers,
Patrick
Code:
<class name="SectionPlan" table="TBXSectionPlan">
<meta attribute="class-code">
<![CDATA[
public String test() {
return "mooooo";
} // test()
]]>
</meta>
<composite-id name="id" class="SectionPlanId">
<key-property name="siteId" column="TBXSiteID" type="integer" />
<key-property name="sectionId" column="TBXSectionID" type="integer" />
</composite-id>
<property name="name" column="TBXSectionName" type="string" />
</class>