db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zamek <za...@vili.pmmf.hu>
Subject Bug in doSelectJoinPortalUser?
Date Wed, 19 Mar 2003 09:01:38 GMT
Hi All,

I would like to repeat my question (posted at last saturday), it maybe saturday is holiday

I was try to use doSelectJoinPortalUser and it was'nt working good.
I made 2 tables :

<table name="STUDENT" idMethod="native" javaName="Student" >
  <column name="S_ID" primaryKey="true" required="true" type="INTEGER"        
   <column name="S_USERID" required="true" type="INTEGER" />
   <column name="S_SPECIALISATION" required="false" type="INTEGER"></column>
   <column name="S_EHA" required="true" type="VARCHAR" size="15"></column>
   <id-method-parameter value="student_seq"/>	
   <foreign-key foreignTable="TURBINE_USER" onDelete="cascade">
        <reference local="S_USERID" foreign="USER_ID"/>

<table name="TURBINE_USER" alias="TurbineUser" javaName="PortalUser"
  <column name="USER_ID" primaryKey="true" required="true" type="INTEGER"     
         javaType="object" />

It is a simple foreign key relation. Torque generate a doSelectJoinPortalUser 
method in StudentPeer class, but when I try to call 
Student.getPortalUser().getFirstName(), it give wrong value.
I was redefine PortalUserPeer.populateObject(Record row, int offset, User obj)
and I was wondering that offset parameter doesn't used in this method.
When I change 
    Value value = row.getValue(j + 1); to
   Value value = row.getValue(j + offset);
its working good!

Question is it a bug, or I don't understanding something?

Used Turbine is: tdk2.2.1 / torque: 3.0

Zoltan Zidarics programmer
PTE University Pecs, Hungary
icq: 43288694

View raw message