Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] CriteriaBuilder and() isNotNull() equals() problem (BUG 316144)

Hi Marc,

Changing the referenced column name to "pickcodigo" on the 1-M should allow it to work in 2.2 (and 2.1 and 2.3). 2.2 introduced slightly more stringent name matching, which in turn appears to be corrected in 2.3 now.

Cheers,
Guy

On 03/02/2011 7:30 AM, MarcNuri wrote:

I found the source of the earlier exceptions. It happens with field mappings of OneToMany and ManyToOne relationships that relate to non id foreign field references.

(Cliente.java)
    @OneToMany(fetch=FetchType.LAZY)
    @JoinColumn(name="clientePick", referencedColumnName="pickCodigo",updatable=false,insertable=false)
    private Collection paduaExpedicionList;
In the above code, the name("clientePick") refers to a unique field which is not the Id of the referenced table. The referencedColumnName is a field in the source entity defined as:
(Cliente.java)
    @Column(name = "pickcodigo", nullable = false, unique = true)
    private String pickCodigo;

As I said in the other e-mail everything works fine in EclipseLink2.3.0M5 and in 2.1.0, the exceptions show only in 2.2.0RC*.

Regards

--Marc Nuri

View this message in context: Re: CriteriaBuilder and() isNotNull() equals() problem (BUG 316144)
Sent from the EclipseLink - Users mailing list archive at Nabble.com.
_______________________________________________ eclipselink-users mailing list eclipselink-users@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Back to the top