-->
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.  [ 1 post ] 
Author Message
 Post subject: Using existent enum property as metaColumn for @Any
PostPosted: Tue Jan 31, 2012 5:11 am 
Newbie

Joined: Tue Feb 14, 2006 9:50 am
Posts: 9
Location: Paris - France
Hello,

I wonder if what I ask on the title is possible.
I have an entity which already has an enum property, mapped using GenericEnumUserType. The value of this enum is already enough to define the targetEntity of an @Any property I need to have on this entity as well.

But if I just add the enum property's column as the metaCollumn for the @Any annotation, I receive the following error:

Code:
org.hibernate.MappingException: Repeated column in mapping for entity: my.Entity column: type (should be mapped with insert="false" update="false")


I tried following the error suggestion like this:
Code:
@Any(metaColumn = @Column(name = "type", insertable=false, updatable=false))


But that didn't change anything, same error.

Is there a way to perform such mapping, or must I have a redundant column to define the targetEntity?

Thank you.


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

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.