OK, this is weird. I have:
Code:
class A
{
int foo;
int bar;
B bletch;
// Getters and setters here
}
class B
{
StringBuffer quux;
public String getQuux()
{
return quux.toString();
}
public void setQuux(String quux)
{
this.quux.replace(0, this.quux.length(), quux);
}
}
and an A table that has a varchar "baz" column.
In my A mapping, I have:
...
<component name="bletch" class="B">
<property name="quux" column="baz" type="string"/>
</component>
...
This gets me:
net.sf.hibernate.PropertyNotFoundException: Could not find a getter for bletch in class B
Which is weird, because I thought the whole point was to say that bletch is-a B, not B implements bletch as a property.
This is using Hibernate 2.0.3, by the way.