[hibernate-dev] Naming strategies and collection element columns

Gunnar Morling gunnar at hibernate.org
Fri Jul 17 09:11:21 EDT 2015


Steve,

There is one remaining itch I have wrt. upgrading OGM to ORM 5.

I have an entity GrandMother with an @ElementCollection "grandChildren" of
type GrandChild. The latter has a property "name" which used to be passed
as "grandChildren.collection&&element.name" to OGM's
NamingStrategy#propertyToColumnName(). We used to detect the
"collection&&element" pattern to determine the right column name fin OGM.

As of ORM 5, this is passed as "grandChildren.name" instead (due to
HHH-6005 [1]). Now I thought
ImplicitBasicColumnNameSource#isCollectionElement() would tell me whether
this is a collection element, but it returns false in this case.

Shouldn't it return true if the replacement magic for HHH-6005 has kicked
in Ejb3Column#redefineColumnName()?

Thanks,

--Gunnar

[1] https://hibernate.atlassian.net/browse/HHH-6005


More information about the hibernate-dev mailing list