Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug (typo+) in softDeletable doc #90

Closed
siciarek opened this issue Feb 6, 2014 · 1 comment
Closed

Bug (typo+) in softDeletable doc #90

siciarek opened this issue Feb 6, 2014 · 1 comment

Comments

@siciarek
Copy link
Contributor

siciarek commented Feb 6, 2014

In README.md in softDeletable sample there is:

// get id
$id = $em->getId();

// now remove it
$em->remove($category);

// hey, i'm still here:
$category = $em->getRepository('Category')->findOneById($id);

// but i'm "deleted"
$category->isDeleted(); // === true

It does not work ;-(
My fix proposal:

// get id
$id = $category->getId();  // <---------------------- CHANGED

// now remove it
$em->remove($category);
$em->flush(); // <---------------------- ADDED

// hey, i'm still here:
$category = $em->getRepository('Category')->findOneById($id);

// but i'm "deleted"
$category->isDeleted(); // === true
@docteurklein
Copy link
Contributor

hey, thanks for the note :)

Can you make a PR with the changes please ?

siciarek added a commit to siciarek/DoctrineBehaviors that referenced this issue Feb 13, 2014
inoryy added a commit that referenced this issue Feb 28, 2014
issue Bug (typo+) in softDeletable doc #90
@inoryy inoryy closed this as completed Feb 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants