Missing @prePersist annotation for setLastinBasket method see http://docs.doctrine-project.org/en/latest/reference/annotations-reference.html#annref-haslifecyclecallbacks