Re: Need help with triggers
"Amil Ganju" <[email protected]> Fri, 4 May 2007 12:54:44 +0530
| Newsgroups | gmane.comp.gnu.enterprise.general |
|---|---|
| Message-ID | <[email protected]> |
I had tried session.find(). But when I run my gfd I get an error message saying it cannot find metadata. Both these classes belong to a module called 'crm'. i tried the following: customerIndex = session.find(crm_metadata) customerIndex = session.find(metadata) I get the same error. NameError: name 'crm_metadata' is not defined NameError: name 'metadata' is not defined 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. Regards Amil Ganju On 5/3/07, Reinhard Mueller <[email protected]> wrote: > > 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.htmlSection > 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 > > > _______________________________________________ Gnue mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnue