aspose file tools*
The moose likes Object Relational Mapping and the fly likes Hibernate tables.reveng.xml oracle sequence Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate tables.reveng.xml oracle sequence" Watch "Hibernate tables.reveng.xml oracle sequence" New topic
Author

Hibernate tables.reveng.xml oracle sequence

Tony Ennis
Ranch Hand

Joined: May 22, 2003
Posts: 86
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

Joined: May 22, 2003
Posts: 86
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

Joined: May 22, 2003
Posts: 86
For whatever reason, I had to supply the schema in the <table param.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate tables.reveng.xml oracle sequence