when I run my hibernation tools it reads from db and creates java classes for each table, and a java class for composite primary keys. it's great.
the problem is in this line
@Table(name="tst_feature" ,catalog="tstdb" )
while a table name is required, the directory attribute is not required. sometimes i want to use "tstdb" sometimes i want to use "tstdev"
I thought which db was selected depends on the jdbc connection url but when i change the jdbc url to "tstdev" it still uses "tstdb"
so, I know what to do, I just don’t know how my options are done
- suppressing the generation of the directory attribute I am currently doing this manually (not very productively) or I could write a program that parses the java file and removes the attribute manually but I hope I don’t need
OR
- find a way to tell hibernate to ignore the directory attribute and use the specified schema. I do not know the exact settings that I have to change in order to achieve this, or even if this option is available.
java annotations hibernate code-generation
Titi Wangsa bin Damhore
source share