-->
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.  [ 3 posts ] 
Author Message
 Post subject: Table prefix with package annotation for all entities
PostPosted: Wed Jun 01, 2005 2:14 am 
Beginner
Beginner

Joined: Tue Mar 15, 2005 2:36 am
Posts: 32
Location: Bonn, Germany
Hello,
I know, I can set the prefix to each table name of each entity as a parameter of the @Entity tag ... but it would be easier, if I set the prefix string only once in an @Entities tag. :)

I ask, because the EJB beta 2 doesn't provide such an annotation ... does it? ... and because I have many entities w/ the same name in different packages. The fully qualified class name as a table name would be too long.

And a last thought: how do I prepend such a prefix to generated tables holding the relation data between two entities?

An example package and entity setup:

a.b.c
Car
Wheel
a.b.d
Wheel

...should result in schema with table names like:

C_CAR_WHEEL
C_CAR_WHEEL

D_WHEEL
D_[C_]CAR_WHEEL

Cheers,
Christian


Top
 Profile  
 
 Post subject: Re: Table prefix with package annotation for all entities
PostPosted: Wed Jun 01, 2005 2:17 am 
Beginner
Beginner

Joined: Tue Mar 15, 2005 2:36 am
Posts: 32
Location: Bonn, Germany
Sorry for the typo...
Sormuras wrote:
[...]
...should result in schema with table names like:

C_CAR_WHEEL
C_CAR_WHEEL

D_WHEEL
D_[C_]CAR_WHEEL


...it should read:

a.b.c
Car
Wheel
a.b.d
Wheel

...should result in schema with table names like:

C_CAR
C_WHEEL
C_CAR_WHEEL

D_WHEEL
D_[C_]CAR_WHEEL


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 01, 2005 11:46 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
there is no such thing right now. Sorry.

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.