-->
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: many-to-many LazyInitializationException
PostPosted: Thu Apr 01, 2004 7:41 am 
Beginner
Beginner

Joined: Wed Nov 26, 2003 9:04 am
Posts: 23
I'm getting a LazyInitializationException for a many-to-many relationship I've had to bolt on as an after thought. I've other many to many relationships in my model that work fine. But for some mystious reason this one just wont play.

I have a bidirectional many to many relationship I need to beable to associate categories and seasons.

So in Category I have
/**
* @hibernate.set
* table="category_season"
* lazy="true" cascade="all" readonly="true"
* @hibernate.collection-many-to-many
* class="murphynye.om.Season"
* column="season_id"
* @hibernate.collection-key column="category_id"
* @return java.util.Set
*/
public Set getSeasons() {
return seasons;
}

public void setSeasons(Set seasons) {
this.seasons = seasons;
}

Season
/**
* @hibernate.set table="category_season"
* lazy="true" cascade="all" readonly="true"
* @hibernate.collection-many-to-many
* class="murphynye.om.Category" column="category_id"
* @hibernate.collection-key column="season_id"
* @return java.util.Set
*/
public Set getCategories() {
return categories;
}

public void setCategories(Set categories) {
this.categories = categories;
}

The linking table category_season is quite uncontreversal has a category_season_id and of course a category_id and a season_id.

Any ideas? I'm stumped..

Thanks

Mark


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 01, 2004 10:09 am 
Beginner
Beginner

Joined: Wed Nov 26, 2003 9:04 am
Posts: 23
Okay ignore this . .It was my home rolled jndi servlet.


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.