Skip to content
Advertisement

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 from another sources (not sequence). So I hope

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 specifies the complete (non-portable!) column definition. This attribute allows

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: EntitiesUser@00000000408bd010000000007cb1380e. Explicitly persist the new entity or configure cascading persist operations on the

Advertisement