-->
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: Annotations equivalent to force=true on discriminator
PostPosted: Thu Apr 27, 2006 9:35 am 
Newbie

Joined: Tue May 17, 2005 8:09 am
Posts: 5
Using: Hibernate 3.2cr1, Annotations 3.1.0 Beta 10, EntityManager 3.1.0 Beta 8

I'm currently experimenting with the annotations package, replacing an existing applications hbm.xml files with annotated class files instead.

Using the hbm.xml file approach I can force the use of the discriminator all of the time:
Code:
<discriminator column="type_id" type="string" force="true"


However, I cannot find any way to apply this using the annotations based approach (using the standard syntax or hibernate equivalent). As such, the generated SQL does not contain the "type_id = 'M'" where clause so I receive "WrongClassException".

Is there any way to set this force attribute using annotations?

Thanks
Andy


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 27, 2006 10:53 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
not yet sorry, you can propably write a patch for that easily though

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 27, 2006 12:49 pm 
Newbie

Joined: Tue May 17, 2005 8:09 am
Posts: 5
Okay, thanks.

You were right, a patch to implement this (a new hibernate extension to the Discriminator column) was easy, however, it looks as if someone has already attempted the fix for this:

http://opensource.atlassian.com/project ... wse/ANN-36

Andy


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.