I'm having some trouble getting hibernate to prefix database table columns with the name of the embedded object they represent. I'm using @Embeddable on the contained object, and @Embedded on the attribute in the parent object. I've tried programmatically setting the naming strategy using:
Code:
configuration.setProperty("hibernate.ejb.naming_strategy",
"org.hibernate.cfg.DefaultComponentSafeNamingStrategy");
and also using the configuration
Code:
<property name="hibernate.ejb.naming_strategy">org.hibernate.cfg.DefaultComponentSafeNamingStrategy</property>
in my hibernate.cfg.xml but to no avail. When I use @EmbeddedID with @Embeddable I get the <variableName_> prefix in the db table. I am using Hibernate 3.5.1-Final. Other possibly relevant information is that I am using Envers, all of this is running under Tapestry, against a MySQL database.
Can anyone share any pointers / gotchas? Thanks.
Regards,
Jim.