On Mar 11, 2008, at 2:21 AM, Nate Lowrie wrote:

> Ok, so I have a bizobj with some fields that I need to include in
> NonUpdateFields.
>
> This applies if I set the NonUpdateFields property in:
>   - afterInit
>   - initProperties
>   - constructor
>
> Code in question: dBizobj.py Lines 347-351

        Here's what that section of code looks like (with line numbers):

  335   def save(self, startTransaction=True):
  336           """Save any changes that have been made in the current row.
  337
  338           If the save is successful, the saveAll() of all child bizobjs  
will be
  339           called as well.
  340           """
  341           cursor = self._CurrentCursor
  342           errMsg = self.beforeSave()
  343           if errMsg:
  344                   raise dException.BusinessRuleViolation, errMsg
  345
  346           if self.KeyField is None:
  347                   raise dException.MissingPKException, _("No key field 
defined  
for table: ") + self.DataSource
  348
  349           # Validate any changes to the data. If there is data that fails
  350           # validation, an Exception will be raised.
  351           self._validate()
  352
  353           isTransactionManager = False
  354           if startTransaction:
  355                   isTransactionManager = self._getTransactionToken()
  356                   if isTransactionManager:
  357                           cursor.beginTransaction()


        I don't see where NonUpdateFields comes into play here.

> The variable self._nonUpdateFields is being set properly.  It contains
> the correct information.  However, the function _syncWithCursors is
> not passing the correct information as the
> self._CurrentCursor.getNonUpdateFields() returns []

        Setting the property (and the self._nonUpdateFields att) should be  
done *before* _syncWithCursors() is called. And _syncWithCursors()  
does not get info from the cursors; it only sets it. So could you  
explain a bit more where the problem is, and what it is that you're  
seeing?

-- Ed Leafe





_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/dabo-dev/[EMAIL PROTECTED]

Reply via email to