-->
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: Define through annotations. How?
PostPosted: Sun Jun 01, 2008 4:22 pm 
Newbie

Joined: Sun Jun 01, 2008 3:37 pm
Posts: 2
Hi, everybody!
How can I define through annotations, this option: lazy="false" ?

Alternative definition similar (xml-mapping) in my class looks like:



Mapping documents:
Code:
  <class dynamic-insert="false" dynamic-update="false" mutable="true"
  name="persistences.main_content" optimistic-lock="version"
  polymorphism="implicit" select-before-update="false" table="main_content" lazy="false">
   
   <id column="id_theme" name="id_theme">
      <generator class="increment"/>
  </id>
  <property column="text_link" name="text_link"/>
  <property column="title" name="title"/>
   <property column="short_descr" name="short_descr"/>
   <property column="context" name="context"/>
   
  </class>


Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 02, 2008 1:28 am 
Expert
Expert

Joined: Tue Jan 30, 2007 12:45 am
Posts: 283
Location: India
Use
@LazyCollection(FALSE)

_________________
Dharmendra Pandey


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 02, 2008 9:32 am 
Newbie

Joined: Sun Jun 01, 2008 3:37 pm
Posts: 2
dharmendra.pandey wrote:
Use
@LazyCollection(FALSE)


But, I can't apply it to whole class:

Quote:
org.hibernate.annotations
Annotation Type LazyCollection
@Target(value={METHOD,FIELD})
@Retention(value=RUNTIME)
public @interface LazyCollection



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.