-->
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: A Collection of UserType elements?
PostPosted: Sun Jul 11, 2010 1:46 pm 
Newbie

Joined: Wed Jun 09, 2010 5:54 am
Posts: 5
How do I use a custom UserType as the elements of a collection? The following did not work:

Code:
<hibernate-mapping package='org.pcj.scrubj.model'>
<class name='User' table='Users' dynamic-insert='true' dynamic-update='true' optimistic-lock='version'>
  <id name='Id' column='ID'>
   <generator class='native'/>
  </id>
  <natural-id mutable='false'>
   <property name='Pager'/>
  </natural-id>
  <version name='Version'/>
  <set name='References' table='User_Ref_set' cascade='save-update'>
   <key column='User_ID'/>
   <element type="org.pcj.scrubj.types.Ref"/> <!-- implements UserType -->
  </set>
  <property name='Firstname'/>
  <property name='Lastname'/>
  <property name='Email'/>
  <property name='Cell'/>
</class>
</hibernate-mapping>


I've had trouble finding any documentation on this.

Thanks in advance,
Paul


Top
 Profile  
 
 Post subject: Re: A Collection of UserType elements?
PostPosted: Sun Jul 11, 2010 10:18 pm 
Newbie

Joined: Wed Jun 09, 2010 5:54 am
Posts: 5
False alarm -- actually, this did work. There was an error in something else that was giving me trouble.


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.