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

Repositoryインターフェイスの整理 #2292

Conversation

kiy0taka
Copy link
Contributor

@kiy0taka kiy0taka commented Apr 24, 2017

概要(Overview・Refs Issue)

方針(Policy)

  • AbstractRepository
    • Doctrineキャッシュ機構を使った取得(get)/全件取得(getAll)メソッドの実装(キャッシュを使わない場合はfindの利用を推奨)
    • del_flgを使用した論理削除(delete)メソッドの実装
    • エンティティの登録/更新メソッド(save)の実装
  • 各リポジトリ
    • AbstractRepositoryを継承し、親クラスで定義されているメソッドを削除またはオーバライド
    • 無意味なメソッドは非推奨(@deprecated)にマークする
      • 引数の$idが0のときに新しいインスタンスを作成するだけのfindOrCreate()
      • EntityRepository::find()メソッドに代替可能なメソッド
      • Simple Conditionsで代替可能なメソッド(magic methodsを推奨)

テスト(Test)

  • 既存テストが通ることを確認

@Yangsin Yangsin mentioned this pull request Apr 25, 2017
@Yangsin Yangsin added this to the 3.1.0 milestone Apr 25, 2017
@chihiro-adachi chihiro-adachi merged commit d1f9126 into EC-CUBE:experimental/3.1 Apr 27, 2017
@kiy0taka kiy0taka deleted the experimental/abstract-repository branch May 11, 2017 08:14
@okazy okazy added the document Improvements or additions to documentation label Jul 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
document Improvements or additions to documentation experimental
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants