-->
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: mapping: <component> inside <dynamic-component> not allowed?
PostPosted: Thu Feb 04, 2010 1:50 pm 
Newbie

Joined: Mon Feb 01, 2010 1:04 pm
Posts: 6
Using Hibernate 3.2.4.sp1 with jboss-4.2.3.GA

Is use of component inside dynamic-component not supported?

When trying to add a component as element in a dynamic-component, I get an Exception:
javax.persistence.PersistenceException: org.hibernate.PropertyNotFoundException: Could not find a getter for myMapKey in class java.util.Map
Code:
Class X {
Map m;
}
Class Y {
String prop1;
}

<dynamic-component name="m" insert="false" update="false">
<component name="myMapKey" insert="false" update="false" class="Y">
  <property name="prop1"/>
</component>
</dynamic-component>

Using a simple property element works, but I would need a mapping to component class Y
Code:
<dynamic-component name="m" insert="false" update="false">
<property name="myMapKey" column="prop1" type="java.lang.String"/>
</dynamic-component>

thx, Jürgen


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.