Re: Need help with triggers

Reinhard Mueller <[email protected]> Fri, 04 May 2007 14:42:30 +0200
Newsgroups gmane.comp.gnu.enterprise.general
Organization GNU Enterprise
Message-ID <[email protected]>
Am Freitag, den 04.05.2007, 12:54 +0530 schrieb Amil Ganju:
> customerIndex = session.find (crm_metadata)
> customerIndex = session.find(metadata)

customerIndex = session.find('metadata')

You just have to quote the class name. It is a string.

> Also while we are at this I had another query. How can I delete
> entries from a detail class from an OnDelete trigger on the master
> class. 

details = session.find('detailclass', {'linkproperty': self.gnue_id})
for detail in details:
    detail.delete()

Thanks,
-- 
Reinhard Mueller
GNU Enterprise project (http://www.gnuenterprise.org)

_______________________________________________
Gnue mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnue
signature.asc (application/pgp-signature, 307 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iQCVAwUARjsqMSpv03KHfKbjAQKLGAQAkH4r3aP6emyEHkeXn6pMPllAqinVqh5d
/m8IMBLjU7qz5gtMZcO9B1O3C8ULV3Zv4wzm2EfLE+CAwYgKQs/mtV+WOB/WWyMt
wbUlTeEMH380CUSAnUDnMKk7jIBknkwWe0LmkcUkmvnvuBCWktELGyixifOe0Rfe
rv/dY+lb4eY=
=1Aoa
-----END PGP SIGNATURE-----