[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] OneToOne AND ManyToOne Mapping works with FetchType.EAGER but not with FetchType.LAZY -> Exception when deploying (SGES 2.1)
|
Tom,
I made some tests according to your proposition. I have tested every
OneToOne and every ManyToOne mapping affected by the issue separately by
changing the FetchType to LAZY (again). The application did never deploy.
---------
Afterwards, I have taken all my OneToOne and all my ManyToOne mappings and
put them in the list below.
---------
A) mappings that work ONLY with FetchType.EAGER:
A1.)
@OneToOne(mappedBy = "[...]", cascade = CascadeType.ALL, fetch =
FetchType.EAGER)
A2.)
@OneToOne(optional = false, mappedBy = "user", cascade = CascadeType.ALL,
fetch = FetchType.EAGER)
A3.)
@OneToOne(optional = false, cascade = CascadeType.ALL, fetch =
FetchType.EAGER)
@JoinColumn(name = "[...]", referencedColumnName = "_id", nullable = false,
unique = true, updatable = false)
A4.)
@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinColumn(name = "[...]", referencedColumnName = "_id", unique = true,
updatable = false)
A5.)
@OneToOne(cascade = {CascadeType.MERGE, CascadeType.PERSIST,
CascadeType.REFRESH}, fetch = FetchType.EAGER)
@JoinColumn(name = "[...]", referencedColumnName = "_id", updatable = false)
A6.)
@ManyToOne(optional = false, fetch = FetchType.EAGER)
@JoinColumn(name = "[...]", referencedColumnName = "_id", nullable = false,
updatable = false)
A7.)
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "[...]", referencedColumnName = "_id")
A8.)
@ManyToOne(optional = false, cascade = {CascadeType.MERGE,
CascadeType.PERSIST, CascadeType.REFRESH}, fetch = FetchType.EAGER)
@JoinColumn(name = "[...]", referencedColumnName = "_id", nullable = false,
updatable = false)
---------
B) mappings that work with FetchType.LAZY:
B1.)
@OneToOne(cascade = CascadeType.ALL, optional = false, fetch =
FetchType.LAZY)
@JoinColumn(name = "[...]", referencedColumnName = "_id", nullable = false)
B2.)
@ManyToOne(optional = false, fetch = FetchType.LAZY)
@JoinColumn(name = "[...]", referencedColumnName = "_id", nullable = false,
updatable = false)
B3.)
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "[...]", referencedColumnName = "_id")
B4.)
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "[...]", referencedColumnName = "_id", nullable = false,
updatable = false)
---------
It is very unlikely that ONLY the JPA mappings themselves are causing this
issue.
Proof:
A7.) is identical to B3.)
A6.) is identical to B2.)
--------
story continues ...
--
View this message in context: http://www.nabble.com/OneToOne-Mapping-works-with-FetchType.EAGER-but-not-with-FetchType.LAZY--%3E-Exception-when-deploying-%28SGES-2.1%29-tp21711849p21736833.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.