> But, what if Address is interface, and I have various implementations of it > : > Address address = new CustomAddressImpl(); > user.setAddress(address);
You have to map the implementation, not the interface. Since Hibernate won't be able to figure out the correct implementation through reflection, you'll have to provide that information: <component name="address" class="CustomAddressImpl"> <property name="street"/> <property name="city"/> ... </component> But then, that only works if the property holds one implementation alone (that's the typical case, however). If the same property can hold more than one implementation, well, you're screwed. -- Marcus Brito --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
