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?
smime.p7s
Description: S/MIME Cryptographic Signature