79453940

Date: 2025-02-20 09:27:41
Score: 1
Natty:
Report link

You actually have two sessions here. You are sending objects associated with the session in the activateRegistrations method in the context for the trigger. In the BibsAssignerJob you get a new session created specifically for that execution.

A common way to handle this is to first save the objects in the activateRegistrations method and only enclose a list of the objects id's within the context to BibsAssignerJob.triggerNow. In the BibsAssignerJob you'll then have to load those objects again within that session - Registration.get() - and you will be able to continue work with them as expected.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Johannes