0

I have an application with Spring 3 and Hibernate 3. It works at this point.

It uses hbm.xml files to map java classes to tables. and on every start it creates empty tables (HSQLDB).

Now I added a class classX with Enum field. The problem is that on start application creates all tables, except classX's one.

Do you have any ideas how to solve this quick (and without annotations)

thank you

user349302
  • 3,491
  • 7
  • 27
  • 31

1 Answers1

0

Check for ERROR lines in the log files.

Apart from that, you should map the enum field in a special way. See here.

I, however, prefer annotations, where you can use @Enumerated on the field to map it.

Community
  • 1
  • 1
Bozho
  • 588,226
  • 146
  • 1,060
  • 1,140
  • The problem is not how to map (UserType works), the problem is that tables are not created on startup. Tables without enum are created. – user349302 Nov 01 '11 at 13:20
  • it works both ways - for a proper generation you need a proper mapping, that's why I thought the issue might be there – Bozho Nov 01 '11 at 13:24