DataDogAuditBundle
DataDogAuditBundle copied to clipboard
1.0-dev: inserting associations causes error on Postgres
Looks like it could be an unintended consequence of the mapping changes in previous commits, and may only affect postgres, I'm not using this bundle with any other DB platforms at the moment so unable to confirm if it happens on Mysql, SQLite etc ...
(https://user-images.githubusercontent.com/4586381/157653353-4d1724d1-9249-46e6-aa12-ce9234b9ba86.png) exception
Originally posted by @acornforth in https://github.com/DATA-DOG/DataDogAuditBundle/pull/93#issuecomment-1063958924
This is likely caused by setting the ID strategy to AUTO, which was intended to make this more portable as Doctrine would then choose the appropriate method for setting the ID. I'll take a closer look and see what we can do here.
@natewiebe13 I tested this on postgres with IDENTITY strategy, and everything seems to behave as expected, it also when generating migrations, didn't drop the DEFAULT expression on the id column. I think this could be the way to go.
Fixed (theoretically) in #93