openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fay Wang <fyw...@yahoo.com>
Subject Re: WebSphere @OneToOne problem
Date Wed, 05 Nov 2008 18:13:35 GMT
Can you turn on the trace?

-Fay


--- On Tue, 11/4/08, John VanAntwerp <jvanantwerp@umuc.edu> wrote:

> From: John VanAntwerp <jvanantwerp@umuc.edu>
> Subject: WebSphere @OneToOne problem
> To: users@openjpa.apache.org
> Date: Tuesday, November 4, 2008, 9:14 PM
> We have an entity that inherits from another entity as
> described in the code
> snippet below.  The specific field we are having trouble
> with is the
> editorInfo field.
> 
> editorInfo needs to be optional because, as you would
> expect, a new entity
> has not been modified, so it has no editor information.
> 
> The specific problem is that intermittently the editorInfo
> field will not be
> filled out even though the appropriate rows exist in the
> joined table.  At
> times the join works perfectly, then, for the same entity
> and keys, it will
> apparently fail and the value of editorInfo will be NULL.
> 
> Has anyone else seen this kind of issue?  Is there
> something wrong with the
> way we have annotated the relationship?
> 
> Thanks!
> - John
> 
> @Entity
> @Table(name="MODIFICATION_TABLE")
> @Inheritance(strategy=InheritanceType.JOINED)
> public class TheEntityExtended extends TheEntity {
> 
> 	private static final long serialVersionUID = (a number)L;
> 
> 	@SuppressWarnings("unused")
> 	@OneToOne(fetch=FetchType.EAGER, optional=true)
>     @JoinColumn(name="AUTHOR_KEY")
> 	public UserInfoEntity authorInfo;
> 
> 	@SuppressWarnings("unused")
> 	@OneToOne(fetch=FetchType.EAGER, optional=true)
>     @JoinColumn(name="DELETED_KEY")
> 	public UserInfoEntity deletorInfo;
> 
> 	@SuppressWarnings("unused")
> 	@OneToOne(fetch=FetchType.EAGER, optional=true)
>     @JoinColumn(name="EDITOR_KEY")
> 	public UserInfoEntity editorInfo;
> 
> }
> 
> -- 
> View this message in context:
> http://n2.nabble.com/WebSphere-%40OneToOne-problem-tp1458838p1458838.html
> Sent from the OpenJPA Users mailing list archive at
> Nabble.com.


      

Mime
View raw message