any mapping with composite id-type does not work

Description

The request seems to be to add support for multi-column any keys. Right now, any associations are limited to a single join column and it’s not so easy to add support for multiple columns, because we’d need a mapping between foreign key join columns and primary/unique key target columns per discriminator. So we’d probably have to add @JoinColumns to @AnyDiscriminatorValue. Apart from that, the whole boot and runtime model would need to be adapted to support multiple columns, since the fact that the key is singular is hard coded in many places.

 

Original description


Any mapping with composite id-type throws MappingException 'property mapping has wrong number of columns'.

The zipped patch file contains:

-bugfix for AnyType.java

  • testcases any mapping with simple id-type and composite id-type

Attachments

1

Activity

Leandro SubilsJune 6, 2013 at 1:54 PM

Hello, any news about this issue? Can anyone fix it?

Leandro SubilsFebruary 8, 2012 at 8:57 PM
Edited

And it's in 4.0.1 version

Leandro SubilsMay 13, 2011 at 4:26 PM

Any news?

Leandro SubilsJanuary 20, 2011 at 8:04 PM

Yes, this bug is still in 3.6.0 version

Former userJanuary 20, 2011 at 7:51 PM

Is this still an issue using 3.6.0?

Details

Assignee

Reporter

Priority

Created February 14, 2006 at 1:21 PM
Updated January 6, 2025 at 2:29 PM