-->
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: PostLoad annotation in OGM
PostPosted: Fri Nov 20, 2015 5:46 pm 
Newbie

Joined: Fri Nov 20, 2015 5:34 pm
Posts: 6
Hi,

I'm having trouble getting the @PostLoad annotation to trigger in OGM and was hoping to clarify whether this feature is currently available in OGM or not. I debugged the code through to the OgmLoader.initializeEntitiesAndCollections which appears to be one of the key methods responsible for loading the raw data into Java objects. Its ORM counterpart (Loader.initializeEntitiesAndCollections) has some logic which appears to trigger the PostLoad events but this logic is missing from the OGM version. I was wondering whether this means that the feature is missing from OGM and if so whether its a case of it just not having been implemented yet or if there is a reason why it shouldn't be built?

Apologies if this is already documented somewhere; I've searched over the web, in this forum as well as on the Hibernate JIRA and haven't been able to find anything on the subject.

Thanks,
David.


Top
 Profile  
 
 Post subject: Re: PostLoad annotation in OGM
PostPosted: Mon Nov 23, 2015 8:59 am 
Hibernate Team
Hibernate Team

Joined: Sat Jan 24, 2009 12:46 pm
Posts: 388
Hi David,

@PostLoad is not yet supported in Hibernate OGM.

There is no general reason speaking against implementing it, it's just that we did not yet get to implementing it. Could you open a feature request in our JIRA at https://hibernate.atlassian.net/browse/OGM? Maybe you even would like trying to implement it yourself? If so just let me know and we'll get you started.

Some other events such as @PrePersist do work btw. as the code paths invoking them are shared between ORM and OGM.

Cheers,

--Gunnar

_________________
Visit my blog at http://musingsofaprogrammingaddict.blogspot.com/


Top
 Profile  
 
 Post subject: Re: PostLoad annotation in OGM
PostPosted: Mon Nov 23, 2015 2:03 pm 
Newbie

Joined: Fri Nov 20, 2015 5:34 pm
Posts: 6
Hi Gunnar,

Thanks for the response! I've created a ticket for the feature (https://hibernate.atlassian.net/browse/OGM-933) and would be happy to take a crack at it.

Thanks,
David.


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.