-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 
Author Message
 Post subject: The ANT tool can not reverse DB schemas w/ same table names
PostPosted: Thu Oct 20, 2005 9:24 am 
Newbie

Joined: Thu Oct 20, 2005 9:12 am
Posts: 6
How can I reverse DB schemas with same table names?

DB: Postgres
Example:
sys.account
um.account

The problem is that the tool (3.1 beta 1) does not use schema name with <hbm2hbmxml> and <hbm2java>.


Top
 Profile  
 
 Post subject: HEY MAX, CAN'T YOU ANSWER A SIMPLE QUESTION?
PostPosted: Mon Oct 24, 2005 4:52 am 
Newbie

Joined: Thu Oct 20, 2005 9:12 am
Posts: 6
MAX, or what ever is your nick name. I'm waiting for the answer more than 5 days already. And by my opinion the question is very easy to answer, especially for the one from so called "Hibernate Team".
Here they are the 2 even simpler questions for you.

1. WHY IF HIBERNATE TOOL CAN HANDLE SCHEMAS, THE NAMING METHOD USES ONLY TABLE NAMES FOR NAIMING CLASSES?

2. HOW TO AVOID THIS OBVIOUS BUG?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 24, 2005 5:41 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
WTF? Could it be I had a weekend and were working for a living and accidently missed one single posting while working hard ?

Yes, the question is simple and the answer is simple too; but i'm not going to answer it for you when you ask like that.

/max

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Thanks for the attention, but still not helpful
PostPosted: Mon Oct 24, 2005 6:38 am 
Newbie

Joined: Thu Oct 20, 2005 9:12 am
Posts: 6
Sorry for being rude, but you have answered so many questions, on top of mine, that I lost my hope already.
This is a problem for most of /I just don't want say "every"/ the products of this kind /example: torque and all of the third party tools for both, torque and hibernate, products/ and that's why I think the answer will be helpful not only for me.
Ones again sorry for my rude behaviour, believe me I've done my best to solve the problem by my self waiting for the answer, but the documentation wasn't very helpful at all.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 24, 2005 6:47 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Well we get about 150+ postings a day so don't expect that I see all that relates to the tools.

Anyway, yes - multiple schemas are something I have as a goal to support and we do that pretty well ...but there might be issues with duplicate names as you have here.

Well, before showing you the answer I would like to ask what you expect the tool todo ? It will bump into 2 tables with the same name - what should it do by default ? Using the schema name as package feels "bad" as a default, doesn't it ?

Right now, our default behavior doesn't handle this automatically (because I can't see a good way to handle it), but you have the possibility to implement a ReverseEngineeringStrategy that handles it the way you want it to be.

This is unfortunately only available via the ant tasks at the moment (i'll add it to the eclipse ui before the next release).

In the next release i'll also add support for specifying the wanted class for a <table> in reveng.xml - for some reason i missed that obvious tag for the beta1 ;(

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: The question why are we using schemas is the obvious answer!
PostPosted: Mon Oct 24, 2005 7:17 am 
Newbie

Joined: Thu Oct 20, 2005 9:12 am
Posts: 6
I am using schemas to logically split tables in DB, but this is also mean that the names of the tables in one schema can be the same ones in the other schema:

sys.Account - System Account table
um.Account - Unified Messaging Account table

Which one I prefer is a BAD question! I want them all.
So the class names should be something like these:

SysAcount - System Account class
UmAcount - Unified Messaging Account class

, or:

Sys_Acount - System Account class
Um_Acount - Unified Messaging Account class

I think that the solution of the problem is very obvious and simple for implementation. And the possibility of configuring the exact way naming Classes is a very good idea of yours.

Is it posible to use <table> tag in hibernate tools 3.1 beta1 version and if "YES", then - "HOW?", because I'm really running out of time with my project.


Top
 Profile  
 
 Post subject: ANT task
PostPosted: Mon Oct 24, 2005 7:20 am 
Newbie

Joined: Thu Oct 20, 2005 9:12 am
Posts: 6
Sorry, I forgot to say that I prefer the ANT task and not interested in Eclipse plugin.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 24, 2005 7:30 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
I did not ask which class you prefferred, I asked what you wanted the tool to do - just using the schema name is a bad default when you *dont* have overlapping table names!

And yes, you just do as stated in the documentation - implement the custom strategy and do what you want in the tableToClassName method.

And again, i said that name the class for <table> support is coming in the *next* release.

And you are pushing my patience with your attitude! If this stuff is so *critical* that you don't have the time and energy to use this opensource software without guaranteed support times then please contact sales@jboss.com

If i don't answer you questions in the future then its because of your tone; so please CHANGE THAT! (see, thats annoying right ?)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Sorry, I'm just trying to be precise.
PostPosted: Mon Oct 24, 2005 7:48 am 
Newbie

Joined: Thu Oct 20, 2005 9:12 am
Posts: 6
Sorry, if you feel offended.
This is not what I want.
For the Second posting of mine I already apologise to you.
But after that I'm just trying to be precise in my point of view. Nothing more.
Ones again sorry if you feel your self ofended in any way.
I also hope that the new release will be available soon.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.