Hi,

I found a way to insert the references, if anybody is interested here is the
code:

AddressB322 ab322 = new AddressB322();
ab322.setAdminarea("FRA");
ab322.setCity("Frankfurt" +  System.currentTimeMillis());
ab322.setCountry("Hessen");
ab322.setPostcode("60313");
ab322.save();

List list = AddressB322Peer.executeQuery("SELECT MAX(IDADDRESS) from
ADDRESS_B322");
Record primaryKey = new Record();

if(list.size()!=0)
{
 primaryKey = (Record)list.get(0);
}

String pk = primaryKey.toString();
int begin = pk.indexOf("'");
int end = pk.lastIndexOf("'");
String uniquePrimaryKey = pk.substring(begin+1, end);

ab322.setIdfreetext(Integer.parseInt(uniquePrimaryKey));

AddressDelpoint ad = new AddressDelpoint();
ad.setAddressB322(ab322);
ad.setDelpoint("Frankfurt");
ad.save();

AddressEmailadd aed = new AddressEmailadd();
aed.setAddressB322(ab322);
aed.setEmailadd("[EMAIL PROTECTED]");
aed.save();


I think it's not the best way but it work :)

Regards
Ferruh


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to