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

[Reflexion] ORM: Behaviors & Filters #128

Open
Biromain opened this issue Sep 27, 2016 · 1 comment
Open

[Reflexion] ORM: Behaviors & Filters #128

Biromain opened this issue Sep 27, 2016 · 1 comment

Comments

@Biromain
Copy link

Biromain commented Sep 27, 2016

Could be nice for ORM has behaviors and filters feature.
Why behaviors?

  • DRY
  • Lambda extension developer (like me) don't needing to care about
    • Sluggable: He just need a getAlias()/getSlug() to make his routes (Behavior add column in table/provide method to Entity).
    • Tree: He just need a getAncestor()/getDescendant()/...
    • ...
  • We can apply fixes/bc enhancements for all extensions.

See DoctrineExtensions

Why filters?

  • Apply by default scope/filter to query like locale, state or ownEdit.
  • Enabled by default and need call method to disable it because we need to disable&know what we are doing.
  • Why not Behaviors provide filters like soft-deletable, publishable_(1.)_, translatable

See Doctrine/ORM Filters

(1.) I think we need to separate delete state from state with property deletedAt(DateTime), with that we can recover to the original state and make treatment like delete/backup soft-delete content.

@nibra
Copy link
Member

nibra commented Nov 12, 2016

Development of Filters has started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants