0

I need to specify multiple column types with JPA, because I support different databases in my application.

I googled but didn't found anything.

Can you help me?

Ashot Karakhanyan
  • 2,804
  • 3
  • 23
  • 28
KarlOi
  • 81
  • 5
  • What do you mean by `multiple column types`? – Svetlin Zarev Feb 18 '14 at 08:28
  • 1
    Maybe different column types depending on the used database like me? http://stackoverflow.com/questions/21460074/different-column-types-for-different-databases-with-jpa – JulianG Feb 18 '14 at 10:32
  • 1
    JPA allows for overriding annotations in orm.xml files. When you define the database in your persistence.xml, point it at a orm.xml that overrides the defaults with database specific types. Other than that, handling database portability defaults will come down to provider specific code. – Chris Feb 18 '14 at 16:15
  • @JulianG: Thanks, this is almost the same question. – KarlOi Feb 19 '14 at 08:38
  • @Chris: I'm looking now for orm.xml. Thank you – KarlOi Feb 19 '14 at 08:42

0 Answers0