-->
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: Problem with org.hibernate.collection.PersistentList
PostPosted: Sat Feb 16, 2008 7:03 am 
Newbie

Joined: Wed Nov 21, 2007 11:03 am
Posts: 8
Hello, i'm new to Hibernate and I got this error while trying to map an ArrayList :
Code:
protected List<UnitDescription> posibleUnits = new ArrayList<UnitDescription>();


Here's my mapping for it :
Code:
<list name="posibleUnits" table="POSIBLE_UNITS_GRABBER">
        <key column="GRABBER_ID"></key>
        <list-index column="POSITION"></list-index>
        <many-to-many column="UNIT_INDEX"
           class="unisave2006.units.UnitDescription">
        </many-to-many>


And here's the error message :
Code:
11:51:50,421 ERROR BasicPropertyAccessor:98 - expected type: java.util.ArrayList, actual value: org.hibernate.collection.PersistentList


I tried to google it, and found out that the type PersistentList is not generic, but it doesn't help. Could somebody tell me what kind of error it is and how to fix it ? Thanks for every help.[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 16, 2008 7:36 am 
Newbie

Joined: Wed Jan 16, 2008 2:53 am
Posts: 5
Hi
test this :

<list name="posibleUnits" lazy="true" cascade="all-delete-orphan" table="POSIBLE_UNITS_GRABBER" inverse="false">

<key column="GRABBER_ID"/>
<index column="POSITION_index"/>
<many-to-many unique="true" column="perm_id" class="unisave2006.units.UnitDescription"/>
</list>


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.