• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

Hibernate - Reverse Engineer - Oracle

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello folks,

I have got an Oracle database with no primary keys defined, just unique constraints. So when I do my reverse engineering for example in a ACCOUNT table I have the following Java model "reversed":

Account


AccountId


So, I tried to define a primary key within my reveng.xml:



But it doesn't work. I realized that the <table> tag is not been read. I can go like this:



Trying to exclude this column but I still get the two classes Account, AccountId with my VERSION column.

Anybody has got any similar problem?
One interesting thing, is that I did the same in a PostgreSQL database and it worked, I could define my primary keys, change my class name and everything... it seems to be something with Oracle.. just guessing..

Anyway, I would appreciate very much any help!
Cheers!
 
Bruno Frascino
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Sorry guys, not my fault.
This problem wasn't making any sense.
I am using Eclipse Europa with JBossTools to do all my reverse engineering, and sometimes Eclipse just close itself because of an error, so I though this problem could be something related to JBossTools. So, somehow my changes in my reveng.xml file wasn't been noticed by hibernate, i started refreshing my app and I used the source view of reveng.xml file to edit it, instead of the fancy graphical jbosstool and now it is working!!!

Thanks anyway!
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Glad we could help.

Mark
 
Thank you my well lotioned goddess! Here, have my favorite tiny ad!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
    Bookmark Topic Watch Topic
  • New Topic