Bugs item #637960, was opened at 2002-11-13 14:07
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=637960&group_id=22866
Category: JBossCMP
Group: v4.0
Status: Open
Resolution: None
Priority: 5
Submitted By: Julien Viet (cooperfbi)
Assigned to: Nobody/Anonymous (nobody)
Summary: cmp bean not loaded
Initial Comment:
When a cmp bean is retrieved by a finder method it does
not set the isCreated property on to true.
my case :
I have a cmr set in a post create with a bean retrieved in
this way :
in UserEJB :
public void ejbPostCreate(....) {
Collection roles = getRoles();
roles.clear();
RoleEJBLocal role = roleHome.findByRoleAndRoleGroup
("authenticated", "Roles"); // custom EJBQL finder
roles.add(role);
}
roles.add(role); throw an exception (cmr field can't be
set in ejbCreate, etc...) because the cmp engine see
the isCreated property to false in
JDBCCMRFieldBridge.addRelation(...)
isCreated value is set to true when a bean is
created or loaded but the finder does not call the
loadEntity on JDBCStoreManager at all.
What I did to make ot work is to force the engine
to load the bean with an access to a cmp field :
RoleEJBLocal role = ... // custom EJBQL finder
**role.getName(); ** // load the instance
roles.add(role);
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=637960&group_id=22866
-------------------------------------------------------
This sf.net email is sponsored by: Are you worried about
your web server security? Click here for a FREE Thawte
Apache SSL Guide and answer your Apache SSL security
needs: http://www.gothawte.com/rd523.html
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development