C
chris.fauerbach
All -
I'm fairly new to Hibernate and have thoroughly read the Hibernate in
Action as well as the online Hibernate document and the xdoclet
documentation (hoping that would give me a clue!)
I have a question about the <component> tag. The example in this book
has to do with a person and their addresses. Fine, no problem. You end
up with a person xml file like this
<class name="person" table="person">
<id ...../>
<property name="personName"....../>
<component name="homeAddress" class="Address">
<property name="street" type="string" column="homeStreet"/>
</component>
......
</class>
a lot was obviously cut out, but the important part is the component.
Does the "Address" class need to be defined as a hibernate class? ( I
think the answer is no, but I'm not sure). Any ideas why this wouldn't
work?
In my application, I have a fully qualified class where address is..
e.g. com.my.company.Address
When I change it to just address I get a hibernate error saying
classdefnotfound (which is a goood thing)
So my setHomeAddress method on my person never gets called. Or does
hibernate work the other way and just set properties on a get? (i'll
try this next so don't really bother to answer that part, I just
thought of that. OK that didn't work).
Any thoughts on why this wouldn't work?
I'm fairly new to Hibernate and have thoroughly read the Hibernate in
Action as well as the online Hibernate document and the xdoclet
documentation (hoping that would give me a clue!)
I have a question about the <component> tag. The example in this book
has to do with a person and their addresses. Fine, no problem. You end
up with a person xml file like this
<class name="person" table="person">
<id ...../>
<property name="personName"....../>
<component name="homeAddress" class="Address">
<property name="street" type="string" column="homeStreet"/>
</component>
......
</class>
a lot was obviously cut out, but the important part is the component.
Does the "Address" class need to be defined as a hibernate class? ( I
think the answer is no, but I'm not sure). Any ideas why this wouldn't
work?
In my application, I have a fully qualified class where address is..
e.g. com.my.company.Address
When I change it to just address I get a hibernate error saying
classdefnotfound (which is a goood thing)
So my setHomeAddress method on my person never gets called. Or does
hibernate work the other way and just set properties on a get? (i'll
try this next so don't really bother to answer that part, I just
thought of that. OK that didn't work).
Any thoughts on why this wouldn't work?