Re: Need help with triggers

Reinhard Mueller <[email protected]> Thu, 03 May 2007 17:00:14 +0200
Newsgroups gmane.comp.gnu.enterprise.general
Organization GNU Enterprise
Message-ID <[email protected]>
Hi, Amil!

Am Donnerstag, den 03.05.2007, 18:06 +0530 schrieb Amil Ganju:
> I'm writing an OnInit trigger in a class customer. The trigger has to
> fetch data from another class called metadata in the same module. I
> can't seem to figure out the python syntax to do so. The documentation
> doesn't elaborate too much either. 

It depends whether the other data (metadata) is referenced from customer
or not.

If customer references metadata by, say, a property named my_meta, you
would do a
m = self.my_meta

If metadata is a separate, non-related class, you would use session.find
as described at
http://www.gnuenterprise.org/tools/appserver/docs/manual/devguide/Procedures.html Section 6.4.2.

If you have further questions, just ask.

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)

iQCVAwUARjn4+ypv03KHfKbjAQKJKAQAlGiWyxixZiqJAN0LUEW7wbLmvoBH66Nu
AqdP8/qeHZsNoWdqAIaWmovrgGzmF8N9ncSWMAKtNP/BX/I1TZUIyYCHc8MFUuPt
NiD+81UkmKC1m2kqaHaEzUoIEMj4HCMlvWlWKkyu3PbaoYwvJ45VzfXnZa2vOzCy
KEaCg2hcyNE=
=wm6I
-----END PGP SIGNATURE-----