My mapping are ok, because yesterday I used eager fetching on all collections
and it worked, I just removed every eager mappings and create criteria for
all one level criteria, problem is when I try to go deeper...

It seams that problem is that session is closed when I try to fetch data...
It seeams that tapestry is closing hibernate sessions automatically. 

Someone told me to implement open session in view... Any suggestion about
that matter? 

Tnx for your fast answers :)


bouil wrote:
> 
> Hi,
> 
> You should check your mapping to be sure the many-to-one relationship 
> between "comment" and "user" is correct, and verify your database table 
> "comment" contains an existing foreign key to the user table.
> 
> Best thing to do is to run your Criteria in a JUnit test.
> 
> Nicolas.
> 
> 
> Bojan Cincur a écrit :
>> Hi all,
>> 
>> I have a little problem.
>> 
>> I'm using hibernate criteria to fetch list of objects that I want to
>> display
>> in loop component. (enclosed in my commentModule component)
>> 
>> Criteria criteria = getManager().createCriteria(CommentBean.class);
>> criteria.setFetchMode("user",FetchMode.JOIN);
>> 
>> this criteria should return list of commentBean objects and associated
>> user
>> object (as said in hibernate documentation),
>> 
>> BUT
>> 
>> when i call in loop element comment.user.username to optain username of
>> user
>> that posted comment I get this error:
>> 
>> Render queue error in Expansion[PropBinding[expansion
>> collaborators/Details:commentsmodule(comment.user.username)]]: Property
>> 'user' (within property expression 'comment.user.username', of
>> me.xxx.xxx.components.commentsmod...@eaabad) is null.
>> 
>> I tried all sorts of thing but I'm not sure what to do next... Is this
>> problem with tapestry and is there some sort of work around?
>> 
>> 
> 
> 
> 
>  
> 

-- 
View this message in context: 
http://old.nabble.com/Tapestry---hibernate-problem-tp26664444p26667111.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to