hibernate-dev

[Prev] Thread [Next]  |  [Prev] Date [Next]

[hibernate-dev] NamingStrategy Enhancement Mike C Tue Jun 16 15:00:20 2009

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
[EMAIL PROTECTED]
https://lists.jboss.org/mailman/listinfo/hibernate-dev