Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Hibernate tables.reveng.xml oracle sequence

 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to add a primary key section to my tables.reveng.xml file so I generate Hibernate classes that automatically use an Oracle sequence for the primary column ID.

I got it working by hacking the following into my QUESTION_TYPE class:



Obviously this isn't the file I want to be hand-editing.

I tried to add the appropriate XML to the tables.revend.xml file. I can make no sense of the documentation. I don't understand what values it wants.

In my tiny world, there are only 2 values - the oracle sequence name (SEQ_QUESTION_TYPE_ID) and the table column to be assigned (ID.)



When I regenerate my classes using the XML above, I get no errors, the classes are rebuilt, but the QuestionType class isn't changed to reflect my sequence. I'd expect *something* to change, or an error.

Would someone throw me a bone please, whether it's the answer or a relevant doc page, I don't care. But the documents I have read so far have been unhelpful except for syntax.



 
Tony Ennis
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no evidence that the <table> section is being processed at all. Is there a way to dump the table names that aren't filtered away?
 
Tony Ennis
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For whatever reason, I had to supply the schema in the <table param.

 
Lasagna is spaghetti flvored cake. Just like this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!