objectbox / objectbox/objectbox-java
Support entity classes that are inner classes
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.6k
- Forks
- 311
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report names no source files, tests, or entry points. Start by locating the entity annotation and build-processing path for the shown Holder.Parent/Child hierarchy, then verify that building this example succeeds without the reported error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- build-system, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100