Page 1 of 1

Triggers and nuBuilder

Posted: Wed May 20, 2015 2:53 pm
by ruiascensao
Hi ,

I have setup a trigger to audit my "part" table.
This trigger runs every time the record is UPDATED and copies the OLD values to "part_audit" table.

Every time I update a record on "part" table I get 3 records on the "part_audit" table:

- 1 record with the OLD values;
- 2 records with the NEW updated values;

Why do I get all these records? Is nuBuilder saving more than one time when requested to do so?

Thank you!

Re: Triggers and nuBuilder

Posted: Wed May 27, 2015 1:51 am
by admin
Rui,

nuBuilder does an insert and then an update, when a new record is created.

This is to cater for users that want autoincremented Primary Keys (a bad choice for so many reasons).

Steven