db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffrey Gehrung <jeffgehr...@yahoo.com>
Subject failing copyObj in Base Objects when using "short"
Date Fri, 21 Feb 2003 06:05:18 GMT
Apparently the recent Object.vm template used by Torque to generate OM 
classes cannot handle the "short" type when designated "primaryKey".  
(I'm using the postgresql db.)

Having tried to generate my OM classes separately, using both the 
torque-3.0 and tdk-2.2, both builds resulted with compiler errors 
pointing 
to "copyObj" statements in the resulting base classes.  (Don't believe 
this problem existed in torque-3.0-b4 or tdk-2.2-b3)

eg.  in my XML, I specify:

  <column name="ownr_cnt"  primaryKey="true" required="true" 
type="SMALLINT"/>

the resulting code fragment within the corresponding "copyInto()" is:

  copyObj.setOwnrCnt(0);

which fails with compiler error:

  "setOwnrCnt(0) in class XXX cannot be applied to (int).

I can work around my many instances of this problem by casting the "0" to a 
short.

I found a subsequent reference to this problem at:

http://archives.apache.org/eyebrowse/ReadMsg?listName=turbine-torque-dev@jakarta.apache.org&msgId=582100

Has a patch been implemented to correct this problem?




 

-------------------------------------- 
Jeff Gehrung (Sr. Programmer Analyst) 
Holstein Association USA 
Brattleboro VT 05302 
802.451.4146 
jgehrung@holstein.com 
jeffgehrung@yahoo.com 
I'm told



---------------------------------
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, and more
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message