objectbox / objectbox/objectbox-java
Enforce type on queries
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Java
- Stars
- 4.6k
- Forks
- 311
- PR merge metrics
- No merged PRs in 30d
Description
If:
Entity_would be a a generic type likeEntity_<Entity>- each property would also be a generic type like
Property<Entity> - the
QueryBuilder#equalmethod (and others) would takeProperty<Entity>as arguments
then the IDE would warn in case of the following statement:
boxForA.query().equal(propertyForB, 42L).build()
(mixing a property of entity B against the box for A)
What do you think?
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
Start by reviewing the Entity_, Property, and QueryBuilder#equal types mentioned in the proposal, along with the surrounding query API. Determine whether entity-property mismatches can be rejected by the IDE without breaking existing usage; the issue is done when the intended type enforcement and its compatibility impact are defined and validated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100