cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site migration is underway. Expect disruption to service on Thursday, Feb. 9!

OGM - Load all for depth 5, exclude one relation from loading

The following like loads "too much" data:
object = session.load(objectclass.class, simID.longValue(), 5);

Its working as it should but i would like to exclude one specific relation from the load.
How can i exclude for example the objectclass.items "HAS_ITEMS" relation?

1 REPLY 1

I'm afraid it is not possible at the moment. The API that seems the closest to what you want to do is org.neo4j.ogm.session.Session#loadAll(java.lang.Class<T>, org.neo4j.ogm.cypher.Filter, int) but that is not exactly it.

On a related note, be cautious when you start using custom depths that the save depth is at least equal to the load depth (which is the case when using the default, infinite (-1), save depth).