On Sep 23, 2008, at 9:29 AM, Sibylle Koczian wrote:
> newrec = False
> diff = {'idn': (u'', u'AC2'), 'amount': (None, Decimal("345.6"))}
Wow, thanks for all the information! That makes it a lot easier to
figure out what's going on.
I've quoted the above because it showed me what the problem is. Note
that even though this is a new record, 'newrec' is False. Digging into
the code, the problem is because of the system we use to track new
records: we store the PKs of new records as dictionary keys to later
on identify them. In your case, the default value of the PK in the new
record (i.e., "") was stored as the key. Later on, when you tried to
save, the PK value was 'AC2'; since this value was not in the keys of
new records, the code assumed it was not new, and thus did not try to
save the PK. This also explains the one traceback you got: that was
the result of trying to move to the record whose PK was the empty
string, since that's what the new records dictionary had saved.
I need to spend a bit of time to figure out the best way to correct
this problem, but right now I'm at work and won't be able to focus on
this until later tonight at the earliest.
Also, it is expected behavior that your local copy of the data would
not have data that was modified by a trigger on the server; likewise,
if another user had modified a record that you have in your local
dataset, you wouldn't see their changes, either, as these only exist
on the server. In order to get that data, you would need to call
self.requery() from the bizobj's afterSave() method.
-- Ed Leafe
_______________________________________________
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]