Skip to content

Multiplex datastore #2146

Answered by aklish
bukajsytlos asked this question in Q&A
Jun 13, 2021 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

If you are going to bridge between stores, you will want to decorate the relationships with Elide's relationship annotations instead of JPA so JPA doesn't try to search for an entity it doesn't manage:

https://github.com/yahoo/elide/blob/master/elide-core/src/main/java/com/yahoo/elide/annotation/ToMany.java
and
https://github.com/yahoo/elide/blob/master/elide-core/src/main/java/com/yahoo/elide/annotation/ToOne.java

Some logic still needs to hydrate those relationships (either done in the store during load or maybe through a life cycle hook on read).

If you are just trying to bridge between two stores (two different JPA entity managers), it seems possible to generalize this somehow althoug…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@bukajsytlos
Comment options

Answer selected by bukajsytlos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants