users@glassfish.java.net

RE: OneToOne works with FetchType.EAGER but not with LAZY (SGES 2.1, EL 1.0.2)

From: Martin Gainty <mgainty_at_hotmail.com>
Date: Sun, 1 Feb 2009 17:49:07 -0500

That link is non-existent

//Take a look at this example for Hibernate 3.3.x
@Entity


@Table(name = "RFQ_RequestOCIParam", uniqueConstraints = {})


public class RfqRequestOciParam implements java.io.Serializable {


...


   @Id


   @GeneratedValue(generator = "myForeignGenerator")


   @GenericGenerator( name = "myForeignGenerator", strategy = "foreign",


                  parameters = @Parameter(name = "property", value = "rfqRequest") )


   @Column(name = "RequestId", unique = true, nullable = false, insertable = true, updatable = true)


   public Integer getRequestId() {


      return this.requestId;


   }


   @OneToOne(cascade = {}, fetch = FetchType.LAZY, mappedBy="ociParams" )


   public RfqRequest getRfqRequest() {


      return this.rfqRequest;


   }


...


}


http://forums.hibernate.org/viewtopic.php?p=2378507&sid=497c986c4ac468fb6f47dc19928287e9

Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.




> Date: Sun, 1 Feb 2009 12:34:50 -0800
> From: glassfish_at_javadesktop.org
> To: users_at_glassfish.dev.java.net
> Subject: OneToOne works with FetchType.EAGER but not with LAZY (SGES 2.1, EL 1.0.2)
>
> Could you please take a look at the following thread:
>
> http://www.nabble.com/OneToOne-Mapping-works-with-FetchType.EAGER-but-not-with-FetchType.LAZY--%3E-Exception-when-deploying-(SGES-2.1)-to21711849.html
>
> It is a very strange deployment issue that only occurs when I try to deploy my app on SGES 2.1. On SJSAS 9.1 Upd 2 my app deploys fine.
>
> Maybe someone has a clue.
> [Message sent by forum member 'zebhed' (zebhed)]
>
> http://forums.java.net/jive/thread.jspa?messageID=329509
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>

_________________________________________________________________
Windows Live™ Hotmail®…more than just e-mail.
http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_howitworks_012009