objectbox / objectbox/objectbox-java

Support entity classes that are inner classes

未关闭
#1,006 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug
主要语言
Java
星标
4.6k
派生
311
PR 合并指标
30 天内没有已合并 PR

描述

Describe the bug
Placing entity classes annotated with @Entity and @BaseEntity in another class will result in an error when building.

Basic info (please complete the following information):

  • ObjectBox version: 2.9.1
  • Reproducibility: always
  • Device: N/A (compile time error)
  • OS: N/A (Android library)

To Reproduce
Steps to reproduce the behavior:
1. Create the following hierarchy of classes and build

public class Holder {
    @BaseEntity
    public static abstract class Parent {
        @Id
        long boxId;
        private String text;

        public String getText() {
            return text;
        }

        public void setText(String text) {
            this.text = text;
        }
    }

    @Entity
    public static class Child extends Parent {
    }
}

Logs, stack traces
Won't provide because this won't help in any way as IDE's build errors will be much clearer when dev-team build it themselves

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

报告没有指出源文件、测试或入口点。首先定位所示 Holder.Parent/Child 层次结构的实体注解和构建处理路径,然后验证构建此示例时不会出现所报告的错误,并且能够成功完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
android, java
领域
build-system, databases
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
28/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。