JBoss Community

Re: Hibernate Tools question

created by Alex Popa-Tesileanu in JBoss Tools - View the full discussion

Hi,

The columns have "not null" set because of programming language I used witch don't deal well with nulls. Also all columns have default value set.

Even I will migrate to java will be a period in witch the old and the new  client will access the database in same time.

The idea is I have to deal with 255 tables witch have 4552 columns. And growing. This is why the first option it is not the best solution.

What I want is, when I add a table, a column or I change it, to easily regenerate domain all domain objects.

The second option I think is the best.

I thought previously to use ReverseEngineeringStrategy to remove table prefix. But I did not know about columnToMetaAttributes. This is very helpful. I tried to put a dummy hardcoded value for each field and it work. What I have to do is to extract the default value from the database.

I know the table, I know the field I will connect to database and extract the default value.

The question is: it is somehow possible to get the database connection from "hibernate console configuration" instead of create a new one ?  I think this will speed-up the reveng process.

 

Your response was very helpful.

Thank You very much,

Alex

Reply to this message by going to Community

Start a new discussion in JBoss Tools at Community