[hibernate-dev] NamingStrategy Enhancement

Max Rydahl Andersen max.andersen at redhat.com
Thu Jun 18 04:07:29 EDT 2009


The biggest concern is compatibility so this would be for some major 
revision...

And what kind of type would you send in ? I guess the hibernate type.

/max

Mike C wrote:
> Hi,
>
> I wish to implement a NamingStrategy which translates the 'id' field
> of a Person entity to have a column name of 'pk_person'. I also wish
> to translate boolean fields to have a column name of 'is_'+field. The
> currently NamingStrategy interface does not support either of these
> because it does not include class/type information in its interface.
>
> Others have also encountered this problem:
> http://opensource.atlassian.com/projects/hibernate/browse/HHH-1655
> http://opensource.atlassian.com/projects/hibernate/browse/HHH-3641
>
> I am keen to resolve these issues. I'm willing to write a patch and
> submit it, however if the concept (of passing type information to the
> naming strategy) isn't acceptable then can someone tell me now so I
> don't spend time writing an unused patch? (Or should I be directing
> this question elsewhere?)
>
> I realise that I can use @Column annotations or mapping files to
> implement these naming conventions, but I'm keen to keep it outside of
> the business model (especially since the model has about 200 tables),
> and it seems like an obvious enhancement to the NamingStrategy.
>
> Cheers,
>
> Mike
> _______________________________________________
> 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