Look in hibernate tools code generation code on how to do this.
It is a component not a persistentclass.
I don't have the source just available here, but something like
Cfg2Java.getJavaType(property) should
give you a good idea.
What is it for ?
-max
Hi All!
I have the following mapping structure in my hbm.xml file:
<class name="Person"
discriminator-value="P">
... <component name="address">
<property name="street"/>
<property name="zip"/>
<property name="country"/>
</component>
...
In Java code I get object of the type org.hibernate.mapping.Property.
For example it is "zip" property.
The question is: how can I know that my Property object is property of
"address" Subclass ("address" component).
Property.getPersistanceClass() returns null.
--
--
Max Rydahl Andersen
callto://max.rydahl.andersen
Hibernate
max(a)hibernate.org
http://hibernate.org
JBoss a division of Red Hat
max.andersen(a)jboss.com