Hello,
I want to replace generated foreign key names (FK + hash(table name) + hash(column name)) with my custom names.
I created new NamingStrategy class with foreignKeyColumnName() method but without efect to resultant foreign key names.
I see in log that my NamingStrategy is used (Using com.anect.rmt.utils.CustomNamingStrategy as naming strategy).
I use Hibernate 3.3.1 with JPA.
Here is my configuration of ANT task:
Code:
<hibernatetool destdir="${output.schema.dir}">
<classpath refid="classpathDefault" />
<annotationconfiguration configurationfile="hibernate.cfg.xml " namingstrategy="com.anect.rmt.utils.CustomNamingStrategy" />
<hbm2ddl
drop="true"
create="true"
export="false"
outputfilename="schema-ddl.sql"
delimiter=";"
format="true"/>
</hibernatetool>
I have also used jpaconfiguration but with the same result. I can change table names for example but not foreign keys.
Please what's wrong?
Thank you in advance,
PETER