Hi there!
Basic Description:
I´m currently trying to reverse engineer POJOs out of an existing database. Generation works so far, but I´m missing the "schema" attribute in my generated annotations.
Details:
I´m running Oracle9 and have several schemas in my DB instance. I want to generate the POJOs for a schema which is not the default one.
So basically what I did was to generate the following reverse.enginieering.xml:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >
<hibernate-reverse-engineering>
<schema-selection match-schema="ALTERNATE_SCHEMA" ></schema-selection>
</hibernate-reverse-engineering>
Tables are only considered for reverseengineering if they are in the given schema. So I think the basic selection works just fine. But the classes that get generated only have the following table-annotation:
Code:
@Table(name = "SOME_TABLE")
In my understanding the annotation should also have an additional "schema" attribute.
I tested with generation of .hbm.xmls and these also lack the schema information. So I guess I´m missing something.
Do I have to set some additional flag or something in one of the reverseengineering dialogs? Or can I add something to the reverse-engineering.xml to make this happen?
Any advise would be appreciated.
Michael