You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by Xavier Maysonnave <xa...@omondo.com> on 2004/02/22 19:36:53 UTC

Object.vm and ObjectWithManager.vm with Java Primitive in PrimaryKey

Hi,

Code generation using Torque Generator Object Mapping 3.1.

When I compiled the generated code I got several errors.

I tested with useManagers = true and useManager = false

I analysed the Object.vm template and the ObjectWithManagerTemplate.vm.

The compile error occured in java primitive used in Primary Keys.

Example code error :
	setCountry(0);
when country is a short, the ideal code could be:
	setCountry((short) 0);

Object.vm line 269
	set${column.JavaName}($coldefval);
could be
	set${column.JavaName}(($column.JavaNative) $coldefval);

Object.vm line 1412
	copyObj.set${col.JavaName}($coldefval);
could be
	copyObj.set${col.JavaName}(($col.JavaNative) $coldefval);

ObjectWithManager.vm line 270
	set${column.JavaName}($coldefval);
could be
	set${column.JavaName}(($column.JavaNative) $coldefval);

ObjectWithManager.vm line 1381
	copyObj.set${col.JavaName}($coldefval);
could be
	copyObj.set${col.JavaName}(($col.JavaNative) $coldefval);

Regards.



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Re: Object.vm and ObjectWithManager.vm with Java Primitive in PrimaryKey

Posted by Scott Eade <se...@backstagetech.com.au>.
Xavier Maysonnave wrote:

> Code generation using Torque Generator Object Mapping 3.1.
>
> When I compiled the generated code I got several errors.
>
> I tested with useManagers = true and useManager = false
>
> I analysed the Object.vm template and the ObjectWithManagerTemplate.vm.
>
> The compile error occured in java primitive used in Primary Keys.
>
> Example code error :
>     setCountry(0);
> when country is a short, the ideal code could be:
>     setCountry((short) 0);
>
> Object.vm line 269
>     set${column.JavaName}($coldefval);
> could be
>     set${column.JavaName}(($column.JavaNative) $coldefval);
>
> Object.vm line 1412
>     copyObj.set${col.JavaName}($coldefval);
> could be
>     copyObj.set${col.JavaName}(($col.JavaNative) $coldefval);
>
> ObjectWithManager.vm line 270
>     set${column.JavaName}($coldefval);
> could be
>     set${column.JavaName}(($column.JavaNative) $coldefval);
>
> ObjectWithManager.vm line 1381
>     copyObj.set${col.JavaName}($coldefval);
> could be
>     copyObj.set${col.JavaName}(($col.JavaNative) $coldefval);

This was addressed by Martin as part of TRQS97.

Scott

-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org