"bdlink" wrote :
| With respect to some of my questions that were unclear:
| 1. JoinTables can map 1-1 and 1-n as well as n-n. I was not clear on how to reverse
engineer this situation.
|
It is not supported at this time.
anonymous wrote :
| 2. I can use the same primary key in both tables to make a 1-1 relation. This wants a
@PrimaryKeyJoinColumn(s) annotation instead of @JoinColumn. I was not clear how to
reverse engineer this situation.
|
Isn't this not what is happening for you now ? (It should if I remember correctly)
anonymous wrote :
| I understand that it would be a lot of work to add everything! I had understood from
the original Hibernate books years ago that the philosophy was that you could use three
strategies with Hibernate:
| 1. Annotate the Java
| 2. write an hbm.xml
| 3. reverse engineer the db metadata
| choosing which ever one suited the situation (and whichever one you write, the other
two will be generated). Since the database metadata does not contain enough information
to generate the other two, you need to help that case with reveng.xml.
|
That is true, but reveng has limitations - but naturally and others because it was simply
not requested or implemented yet. (I give commit access to anyone contributing features
90% properly done and with testcases - hint hint ;)
anonymous wrote :
| I understood the ultimate goal would be that there are equal capabilities with all
three strategies. If not, we should say that one of these is the best practice, but the
others can be useful at times (since the world seems to be moving away from xml, I guess
that the Java annotations would have to be primary?)
|
That is correct - I don't believe we ever said otherwise.
anonymous wrote :
| Java Persistence with Hibernate, Bauer and King, indicate that the above three
strategies are feasible (and recommend 2 only for the seasoned Hibernate expert). Also
Dan Allen's Seam in Action book gives the three strategies.
|
I will need to check but I believe they write that reverse engineering has limitations and
should be used as a "first-shot"/inspiration.
anonymous wrote :
| So I would not be put out of reveng.xml became as big as hbm.xml :)
|
Sounds like you just volunteered ?
anonymous wrote :
| Further information on the error (this is H11 update installed) By the way, where do
I look to find the hibernate-reverse-engineering-3.0.dtd?:
|
in hibernate-tools.jar
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4215924#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...