objectbox / objectbox/objectbox-java
Allow @Entity to override same name property of @BaseEntity
まだ誰も着手していません。
- 主要言語
- Java
- スター
- 4.6k
- フォーク
- 311
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Trying to add same name variable in Entity which is already defined in parent class annotated by BaseEntity.
@Entity
public class Child extends Parent {
@Id(assignable = true)
public long id;
}
@BaseEntity
public class Parent {
@Id
public long id;
}
Building the project throws the following error:
error: [ObjectBox] Could not add property: Duplicate name "id" in entity "Child": [Property id of Child] vs. [Property id of Child] (com.mecofarid.myapplication.Child.id)
public long id;
Is there any workaround or method to override the same name variable in the child class?
Note: Removing BaseEntity annotation from Parent class builds successfully
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、issue に示されている Child クラスと Parent Java クラスを使って、両方の @Id フィールドと @BaseEntity を含めた build を再現します。生成された重複プロパティエラーを、@BaseEntity を削除した後に build が成功する場合と比較します。継承ケースがサポートされているかを判断し、確認済みの回避策を文書化または実装できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- databases
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100