-->
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.  [ 3 posts ] 
Author Message
 Post subject: Recursive prolbem of User's Updator
PostPosted: Fri Apr 07, 2006 2:59 am 
Newbie

Joined: Thu Apr 06, 2006 9:30 pm
Posts: 3
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

I use field Updator to keep Class User's updator, Updator itself is of Class User:
Class User{
...
User updator;
}
This makes a recursive problem which may cost a lot memory(Do not know how hibernate solve such recursive prolbem).I tried a method, make a new class SimpleUser to be the updator which itself don't have a updator:
Class SimpleUser{
...
}
Class User extends SimpleUser{
...
SimpleUser updator;
}
But sometimes I got WrongClassException. How to solve such problem?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 09, 2006 9:10 pm 
Newbie

Joined: Thu Apr 06, 2006 9:30 pm
Posts: 3
Isn't there someone meet the same problem,I do think this is a common issue ,what to do if User's updator is also a User, is recursive OK here?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 11, 2006 9:25 pm 
Newbie

Joined: Thu Apr 06, 2006 9:30 pm
Posts: 3
<hibernate-mapping>
<class
name="com.plaza.dal.model.User"
table="T_USER"
>
<id
name="id"
type="java.lang.Long"
column="ID"
>
<generator class="sequence">
<param name="sequence">SE_T_USER</param>
</generator>
</id>
<many-to-one
name="updator"
class="com.plaza.dal.model.User"
column="UPDATOR"
/>
</class>
</hibernate-mapping>
hibernate mapping is above,someone help.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.