Skip to content

[core] overwrite storage strategy for entity references #143

Description

@CrystalMethod

It shall be possible to overwrite the default storage strategy for entity references. By default XO will translate such references into relationships. Most (Nosql) database don't support "real" relationships but other strategies like foreign keys. In MongoDb one can use manual refences by id or so called dbrefs (db + collection + id).

interface A {
  B getB();
  setB(B b);
}
{
"_id": original_id,
"b": "_some_manual_key"
}
{
"_id": original_id,
"b": {
  "$ref" : "b",
  "$id" : ...,
  "$db" : "db"
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions