On 2/3/10 10:50 AM, Jacek Kałucki wrote: > There is yet another thing in Dabo that makes me angry.
Don't be angry. Dabo isn't behaving with spite or malice. :) > I know purpose of __nonUpdateFields attribute, > but isn't its use too restrictive? > I mean exclusion from memento update. > I have a bizob like this: > SELECT a.*, b.manufacturer_name ; > FROM table1 a LEFT JOIN table2 b ON a.manufacturer_id = b.iid > Now, after I issue cancel, all fields are restored except field > from foreign table. > To restore field value I must issue requery this bizobj and > all it's children too. > I know what could you say, why don't create bizobj instead of join? > But Isn't creation entire bizobj just for one non updatable > field wasting of resources? I'm just asking. I do joins like this sometimes. I have a fillDerivedFields() method in my bizobj that fills in the proper values from the joined table to avoid requerying the entire dataset to do so. I call self.fillDerivedFields() from bizobj hook methods like afterSave() and afterCancel(). Targeted queries are executed to get just the needed values for the needed row(s), and it works well. Perhaps cancel() could be enhanced to restore the old values of the NonUpdateFields automatically, like you suggest. Off the top of my head I can't think of a reason why it couldn't be done, or even why we wouldn't want to do it. Paul _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/[email protected]
