-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Neo4j and lazy fetching
PostPosted: Fri Jun 09, 2017 3:04 pm 
Beginner
Beginner

Joined: Thu Jan 05, 2017 1:47 pm
Posts: 27
We've designated some @ManyToOne fields as FetchType.LAZY, but we're still finding lots of Cypher queries against the db that seem to be resolving the associated entity. E.g.:

Code:
MATCH (owner:ENTITY:`MY_ENTITY_TYPE` {dbId: {0}}) -[r:parent]-> (target) RETURN target


Is this expected?

It doesn't seem to load the rest of the associated entity though - i.e. there are no queries for its embedded fields or anything.

We're using the 5.0.1 Final OGM.


Top
 Profile  
 
 Post subject: Re: Neo4j and lazy fetching
PostPosted: Fri Jun 30, 2017 8:01 am 
Hibernate Team
Hibernate Team

Joined: Fri Sep 09, 2011 3:18 am
Posts: 295
Sorry for the late reply,

*-to-one entities are always resolved unless they are not nullable.

Just to be sure, could you show an example of entity mapping, the result you are seeing and the one you expect?

Thanks,
Davide


Top
 Profile  
 
 Post subject: Re: Neo4j and lazy fetching
PostPosted: Fri Jun 30, 2017 8:30 am 
Beginner
Beginner

Joined: Thu Jan 05, 2017 1:47 pm
Posts: 27
Okay, thinking about it I guess it needs to know whether to create a stub or leave the field null in the nullable case. So that makes sense to me.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.