Skip to content

Tag: doctrine-orm

Generating next sequence value manually in Doctrine 2

What would be the easiest way to generate nextval for some particular sequence with given name? The annotation solution with specifying doesn’t satisfy me, as long as there is some more complex logic involved: in some cases I need to retrieve nextval, in other – I would go with the value retrieved…

Doctrine 2 + unsigned value

Is it possible to specify a column type of unsigned integer in Doctrine 2? Answer You can but you will loose portability. Use columnDefinition attribute and set it to integer unsigned. The actual code depends on what you are using. columnDefinition: DDL SQL snippet that starts after the column name and specif…

Doctrine 2: Saving Entity in Complex Relationship

I have the following relationships within my doctrine entities: FavoriteRecipe Recipe User In one of my controllers I have the following code: But this throws an exception with the following message: A new entity was found through a relationship that was not configured to cascade persist operations: EntitiesU…