I think the problem you are having has already been fixed in cvs Branch_3_0 and HEAD. The problem was that fields set after a finder was executed were not stored.
As for debugging the first thing it to increase the log level of org.jboss.ejb.plugins.cmp to TRACE. The classes called when you set a CMR field are (off the top of my head) org.jboss.ejb.plugins.cmp.bridge.EntityInterceptorBridge.invoke org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCCMRFieldBridge.setValue At this point it goes through the interceptor stack of the related entity. Then it falls back through. -dain Danilo Luiz Rheinheimer wrote: > Hello Dain, > > I am with some problems when I set the relationships between entity > beans. > To try to solve this (and learn about JBoss) I am debugging the CMP > source code. So I am setting many system.out.println and > looking on what happens when I try to make the relationship. > But if Dain (or someone who knows the CMR implementation) can help > this will be very good. > My questions is : what classes/methods are called when this > setDepartament(departamentLocal) method is called : > > public abstract class EmployeeBean implements EntityBean { > > public abstract DepartamentLocal getDepartament(); > public abstract void setDepartament(DepartamentLocal departament); > > public void setDepartamentByName(String nameDepartament) { > departmentLocal = // get the local interface to the Departament > setDepartament(departamentLocal); > } > > This is a relation 1-N between Departament-Employee so in the > database I will have this : > > create table departament ( > iddepartamnet integer, > name integer > ) > > create table employee ( > idemployee integer, > emp_name String, > iddepartament Integer // key to departament > ) > > So I hope setDepartament(departamentLocal); will cause this update > to be executed : > > update exmployee set iddepartament = 3 where idemployee = 5 > > My questions are : > > - this update format is right ? > - What class will build the sql command "JDBCInsertRelationsCommand" > can insert relations on (N-N) relationships but on 1-N how this works > ? > - I can see the method setForeignKey of the class JDBCCMRFieldBridge > is called. With the right paramenters I think. > - What is the sequence of calls to make the update on the database ? > > Thanks. > -- xxxxxxxxxxxxxxxxxxxxxxxx Dain Sundstrom Chief Architect JBossCMP JBoss Group, LLC xxxxxxxxxxxxxxxxxxxxxxxx ------------------------------------------------------- Sponsored by: ThinkGeek at http://www.ThinkGeek.com/ _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development