Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7721535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:56:58+00:00 2026-06-01T03:56:58+00:00

Doctrine2 docs said that soft-delete behavior should be better implemented as a State pattern

  • 0

Doctrine2 docs said that soft-delete behavior should be better implemented as a State pattern But not provide any example of that implementation.

How to achieve soft delete behavior using a state pattern?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T03:57:00+00:00Added an answer on June 1, 2026 at 3:57 am

    I think they refer to filters which are available since version 2.2:

    The filter functionality works on SQL level. Whether an SQL query is
    generated in a Persister, during lazy loading, in extra lazy
    collections or from DQL. Each time the system iterates over all the
    enabled filters, adding a new SQL part as a filter returns.

    The DoctrineExtensions library includes a “soft-delete” behaviour. You might want to have a look at their implementation to see how it works in detail.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that frameworks like Synfony2, Doctrine2, PHPUnit, etc... have support for annonations but
I kwnow that using an ORM like Doctrine2 for building queries is safe ,
I have a PHPUnit test that's using a Doctrine2 custom repository and Doctrine Fixtures.
Is this code (in Doctrine2) secured against SQL injection? Or should be $_GET['value'] sanitized?
What does this error from Doctrine2 & Symfony2 mean? Could not convert database value
Say I have two entities in Doctrine2 that are related to each other, Models\User
In doctrine1 it was possible to generate-models-db. How to do that in doctrine2 from
I'm using DynamicGuys doctrine2 integration into zend framework(https://github.com/dynamicguy/zf1doctrine2). It works, but if i want
Now that I've read all the DQL docs I still have some doubts, I'm
I have a php script that uses Doctrine2 and Zend to calculate some things

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.