-->
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.  [ 2 posts ] 
Author Message
 Post subject: Recommend approach to handling conflicting @Entity names?
PostPosted: Thu May 11, 2006 9:25 am 
Beginner
Beginner

Joined: Fri Aug 27, 2004 1:59 pm
Posts: 33
How is it recommended (or even possible) to handle the case when a product is using thirdparty jars which include @Entity's where the names conflict, and it is not possible to change the source code to fix the conflict?

For example,

ComponentA.jar:
Code:
package com.componentA.foo;

@Entity
public class Order { ...}


ComponentB.jar:
Code:
package com.componentB.bar;

@Entity
public class Order { ...}


When hibernate loads these classes it will use only the unqualified name of the class ("Order") and hence result in error. (See http://opensource.atlassian.com/project ... se/ANN-341).

Has anybody run into this? How do you work around it? I can't find anything in the spec which states the the default for @Entity.name() /must/ be the unqualified name of the class. In fact, I can't find anything at all on how to handle @Entity name conflicts.

thanks!!


Hibernate version:

3.1.2

_________________
-barry
---------------------
polly want-a point?


Top
 Profile  
 
 Post subject: answer
PostPosted: Thu May 11, 2006 10:40 am 
Beginner
Beginner

Joined: Fri Aug 27, 2004 1:59 pm
Posts: 33
Emmanuel pointed me to the section in spec:

Quote:
Stated in the spec PDF Chapter 8.1 in my version.
either use a fqcn in your @Entity(name) or use XML to override the mapping

_________________
-barry
---------------------
polly want-a point?


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