menu

Elide

Elide is a java library built to make it easy to expose JPA beans as either a JSON API or a GraphQL webservice

Channels
Team
Posts
Chat
Members
Info
Show previous messages

May 4, 2020 at 5:31pm
Elide has a simply in-memory store you can play with - and you can register functions (life cycle hooks) that can be called whenever something happens to one of your models.
  • reply
  • like
But the in-memory store is local to a host - and won't work in a distributed fashion.
  • reply
  • like
Elide has a pretty simple high level design:
  • reply
  • like
  1. API parsers (JSON-API and GraphQL)
  • reply
  • like
  1. The core layer which wraps model instances so that security is invoked and life cycle hooks get triggered.
  • reply
  • like
  1. The persistence layer which reads & writes models from something
  • reply
  • like
Elide doesn't care what that something is - it just needs to implement the DataStore and DataStoreTransaction interfaces.
  • reply
  • like
Each DataStore manages one or more models
Edited
  • reply
  • like
Datastores tell Elide at startup what models they manage in the populateEntityDictionary function.
Edited
  • reply
  • like
That's the gist
  • reply
  • like
Gotcha--I'll look into implementing the DataStore and DataStoreTransaction interfaces then.
  • reply
  • like

May 21, 2020 at 6:38am
I have an entity with
@Enumerated(value = EnumType.STRING)
@ElementCollection(targetClass = RegionName.class)
private Set<RegionName> regions;
private enum RegionName {
MAIN, RIGHTRAIL
}
Is there a way to create an RSQL filter on regions? module?filter[module]=regions=='MAIN'gives me Parameter value [MAIN] did not match expected type [java.util.Set (n/a)]
Edited
  • reply
  • like

May 21, 2020 at 2:35pm
We just added a new feature in the latest release for the 'hasmember' operator
like-fill
1
  • reply
  • like
The above link provides an example of use.
Edited
  • reply
  • like
THere are caveats though in its use - there is a Hibernate bug that prevents it being used for subcollection filters.
  • reply
  • like
We haven't documented this filter operator yet.
  • reply
  • like

June 29, 2020 at 10:34pm
Hi there! We're using Hibernate with Elide to build a JSON API and an IdClass to be used as composite primary key for one of the tables. We're seeing an issue with Elide returning just a (what appears to be random) part of the composite key as id in resource identifier objects and also it returns only parts of the composite key as attributes. Is this expected behavior? A workaround we found for this was to use a plain primary key as id for the table and add a constraint on the DB schema level.
Edited
  • reply
  • like

June 30, 2020 at 2:26pm
Known Issue
  • reply
  • like
It is something we want to add support but haven't had cycles to add this capability
  • reply
  • like
I would be happy to help coach a submission
  • reply
  • like
It is something we want to add support but haven't had cycles to add this capability
Thanks much for the confirmation!
  • reply
  • like

July 1, 2020 at 9:50pm
Support for composite IDs:
like-fill
1
  • reply
  • like