-->
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: Error with mapping a List
PostPosted: Mon Jun 21, 2010 11:03 am 
Newbie

Joined: Mon Jun 07, 2010 9:31 am
Posts: 2
Hi everyone! I have a weird problem that I haven't been able to find the answer to anywhere so I thought I'd come to the experts. I was trying to do a simple mapping of a List object (something that should be really easy!) but I keep getting an error saying I'm not matching the format specifically:

Code:
The content of element type "list" must match "(meta*,subselect?,cache?,synchronize*,comment?,key,
(index|list-index),(element|one-to-many|many-to-many|composite-element|many-to-any),loader?,sql-
insert?,sql-update?,sql-delete?,sql-delete-all?,filter*)".


This is my mapping for the list:

Code:
<list name="cause" cascade="all">
     <key column = "ruleId"/>
     <index column="eventId" />
     <many-to-one name="Event"/>
   </list>


for this line:

Code:
private List<Event> cause;


This error is really hard to decipher; I figured that everything with the question mark was optional and don't know what the stars mean. I've included the three required statements consistent with examples and (I think) the official Hibernate reference. Any help will definitely be appreciated!


Top
 Profile  
 
 Post subject: Re: Error with mapping a List
PostPosted: Mon Jun 21, 2010 4:33 pm 
Newbie

Joined: Mon Jun 07, 2010 9:31 am
Posts: 2
Found the problem. There's no many-to-one mapping as I messed up my searching. Changed it to

Code:
<list name="cause" cascade="all">
     <key column = "mach"/>
     <list-index column="pieces" />
     <one-to-many class="Event"/>
    </list>


Thanks everyone who checked this out. Still don't know what the stars are for though...


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.