[hibernate-dev] Naming strategies and collection element columns

Steve Ebersole steve at hibernate.org
Tue Jul 21 11:33:37 EDT 2015


In theory yes.  You are free to try and interpret all this lovely
annotation binding logic and make that do the right thing :)



On Fri, Jul 17, 2015 at 8:54 AM Gunnar Morling <gunnar at hibernate.org> wrote:

> 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
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>


More information about the hibernate-dev mailing list