-->
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.  [ 4 posts ] 
Author Message
 Post subject: hbm equivalent of @LazyGroup in hibernate 5.1.0
PostPosted: Fri Apr 15, 2016 9:51 am 
Newbie

Joined: Fri Apr 15, 2016 9:16 am
Posts: 2
Hibernate 5.1 has option for specifying fetch groups for lazy fields. (Of course this requires byte code enhancement). There is documentation for showing how to specify fetch group using @LazyGroup but could not find anything to mark lazy group in hbm.

@Basic( fetch = FetchType.LAZY )
@LazyGroup( "lobs" )
private String name;


hbm : <property name="name" type="string" lazy="true" ???="lobs">
<column name="name" />
</property>

what would be the attribute name to replace "???" ?. lazygroup="lobs" does not work.


Top
 Profile  
 
 Post subject: Re: hbm equivalent of @LazyGroup in hibernate 5.1.0
PostPosted: Sat Apr 16, 2016 2:07 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
There is no such thing in HBM. The annotations are to be the preferred from Hibernate 5.0 onwards.


Top
 Profile  
 
 Post subject: Re: hbm equivalent of @LazyGroup in hibernate 5.1.0
PostPosted: Thu Apr 21, 2016 6:02 am 
Newbie

Joined: Fri Apr 15, 2016 9:16 am
Posts: 2
So the hbm would be phased out!!!
HBMs allowed to keep domain java classes separate from hibernate specific configurations and mappings. Now these classes would be hardwired with hibernate dependencies and it would create problems in migrating to hibernate 5 from earlier versions. Request to consider supporting hbms with new features.


Top
 Profile  
 
 Post subject: Re: hbm equivalent of @LazyGroup in hibernate 5.1.0
PostPosted: Thu Apr 21, 2016 12:11 pm 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
It's not decided what exactly will happen. It's possible to provide an extension to JPA orm.xml mapping too. The reason for this is that it takes more resources to maintain two mapping approaches.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.