db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andras Balogh <and...@reea.net>
Subject Re: AW: defaultIdMethod="none"
Date Tue, 31 Aug 2004 09:44:44 GMT
Hello,

    I think when you are using idMethod="none" torque know that you are 
in charge of setting the primary key
values and doesn't try to set them.
What you have to do is to do a select on  AddressB322Peer after insert 
to get it back your AddressB322
also with the ID inserted by  your trigger than you can use it later for 
referencing.

Best regards,
Andras.

Ferruh Zamangoer wrote:

>Sorry I have seen that the data is inserted into the AddressB322 table
>correctly, but how can I set the references to the table  AddressDelpoint,
>AddressEmailadd. My understanding is that the data is inserted correctly by
>the underlying database, but the ab322 Object becomes no data back or have
>not the actual primaryKey???
>
>
>
>	AddressB322 ab322 = new AddressB322();
>	ab322.setAdminarea("FRA");
>	ab322.setCity("Frankfurt" +  System.currentTimeMillis());
>	ab322.setCountry("Hessen");
>	ab322.setPostcode("60313");
>	AddressB322Peer.doInsert(ab322);
>
>	AddressDelpoint ad = new AddressDelpoint();
>	ad.setAddressB322(ab322);				//references
>	//ad.setIdaddress(ab322.getIdaddress());
>	ad.setDelpoint("Frankfurt");
>	ad.save();
>
>	AddressEmailadd aed = new AddressEmailadd();
>	aed.setAddressB322(ab322);				//references
>	//aed.setIdaddress(ab322.getIdaddress());
>	aed.setEmailadd("ferruh.zamangoer@gistec-online.de");
>	aed.save();
>
>
>
>
>
>
>
>
>  
>


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


Mime
View raw message