Some entities aren't having ID references updated on persistence
Entities created with the IDENTITY generation strategy are not being properly updated before the flush of the transaction session. This causes the entity to have a NULL value for an ID that exists in the database. This doesn't seem to impact IDs generated by other built-in strategies.