layout | title |
---|---|
manual |
Stateful Relations |
Note: statefull relations are a beta feature, supported only as of version 0.9.4beta4
Stateful relations have the same methods as stateless ones, the main difference is that wherever you have a Query[A] in a stateless
becomes an Iterable[A] in a stateful relation.
Stateful relations are defined exactly the same way as their stateless counterpart, with the exception that the leftStateful and rightStateful methods are
invoke instead of left and right :
Methods in statefull relations are very similar than their stateless counterpart, their signatures are slightly different, and have a refresh method. Note the relation property, it is the stateless relation objects that provides the persistence related functionality. A stateful relation is in fact a wrapper over a stateless one, with caching.
The similarity between StatefulManyToMany and ManyToMany is also very apparent :