Object NOT committing

0
Hi there, I am trying to commit an object on an After commit action that finds the current logged in user and sets a custom _ChangebBy attribute string to the logged in account's username. It also sets an association MyObject * -> 1 Account. . When I debug with breakpoints I can see the account object is retrieved and it has a username. But when I review the objects in a grid or in the DB the association is NOT set and the _ChangedBy string is empty. I even try to manually commit it without using the after commit and it refuses to commit. I think this might be a bug with 4.2.2 because this is happening with another object commit in the same project. So if no one has an answer I will log a ticket with support. Thanks
asked
2 answers
0

Hmmm. Changing attributes or associations in an After Commit action can be problematic. If you commit the changes, you run the danger of forming an infinite loop unless you perform the save 'without events'

Why not use a Before Commit action to set the association etc.?

answered
0

Did you check these two usual suspects?

  1. Use PostgreSQL instead of HSQLDB (hsqldb is very sensitive for deadlocks.)
  2. Do you have events that might return false without enabling 'raise exception' on the event configuration?
answered