Announcement Announcement Module
No announcement yet.
Working with existing databases Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Working with existing databases

    Roo works fine as long as I use it to create new database in my application. But when I try to use its generated JPA classes/aspectj classes to map an existing database it gives me headache because the default JPA classes always cannot map the datatypes to the database correctly. If I map all the datatypes to Oracle then when I use SQL Server it breaks again. Does anyone have successful experience to make Roo generated classes work well both in existing databases on Oracle and SQL Server?

  • #2
    With or without Roo, it would be difficult to get the same domain model working properly with two different databases. For example, Oracle's table and field names are case insensitive (identifiers are stored as uppercase), but with MySQL, it is legal to have two tables with the same name but different case. Also, sequences are not supported by all databases either. As you mentioned data types can be very different between databases.

    But you can use Roo's DBRE feature to reverse engineer your databases.