If no one has stumbled upon it it's probably because what you are doing is
weird from a DB point of view. You might want to try building your data
model from the DB first and then into objects and see if what you want still
makes sense.

On 10/7/05, Vjeran Marcinko <[EMAIL PROTECTED]> wrote:
>
> Hi.
>
> In absence of answers at Hibernate forums, and everywhere else, I had to
> ask here since this community is so desired to help anyone.
>
> Hibernate praises itself for letting developer design domain model in fine
> grained way, using all typical OO ways, such as poymorphism etc... and
> then
> I start using it, and want to map value object hierarchy, and suddenly -
> it
> seems impossible!
>
> Typical example of mapping value object would be with <component>
> declaration inside Hibernate's hbm.xml for cases such as User entity
> containing Address:
> Address address = new Address();
> user.setAddress(address);
>
> Everything's fine, and Address maps itself into columns inside user record
> in db.
> But, what if Address is interface, and I have various implementations of
> it
> :
> Address address = new CustomAddressImpl();
> user.setAddress(address);
>
> Soooo typical, and Hibernate cannot do it! Everywhere is only described
> how
> to map hierarchy of entities, and not value objects.
> Suggestions? (somehow, I don't want to convert my Address value object
> into
> entity, just so Hibernate would be able to map it) I cannot believe
> Hibernate users didn't stumble upon this already ...
>
> -Vjeran
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to