objectbox / objectbox/objectbox-java

Flexible relations based on non-ID properties

Open
#155 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
4.6k
Forks
311
PR merge metrics
No merged PRs in 30d

Description

another thing i think need, define custom property from source and target to realtion, example :

@Entity
public class Customer {
    @Id private Long id;
    private String tag;
 
    @Backlink(joinProperties = {
        @JoinProperty(name = "tag", referencedName = "customerTag")
    })
    private ToMany<Order> orders;
}
 
@Entity
public class Order {
    @Id private Long id;
    private String customerTag;
}

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Java entity example and its use of @Backlink and @JoinProperty. The requested behavior is a relation joining Customer.tag to Order.customerTag rather than IDs; done would mean this custom-property relation is supported, but the issue names no files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.