Ehcache works on one JVM, Memcached server can be moved to separate
machine (it's possible to use Play cluster if to follow stateless
architecture).
Play examples advises to use Memcached:
http://www.playframework.org/documentation/1.0.3/cache
The possible workaround is described here:
https://jira.jboss.org/browse/JBAS-3952
:
You may define your relation as EAGER when possible...
But it's not perfect - joins, big datasets between jvm and database...
Big overhead.
It's possible not to use relation:
store Long city_id instead of City, and have setter and getter:
public void setCity(City city) {
this.city_id = city.getId();
}
public City getCity() {
return City.findById(this.city_id);
}
It works (even multiple calls to getCity() will return object from
Hibernate's session) but it is ugly.
Is there any nicer way?
On Jul 26, 2:09 pm, GrailsDeveloper <
opensourc...@googlemail.com>
wrote: