users@glassfish.java.net

Re: Why is it selecting from other entities?

From: <glassfish_at_javadesktop.org>
Date: Tue, 21 Aug 2007 05:01:02 PDT

Hi Marina,

Thank you for the reply. I modified the Employee.java as shown below

+++++++++++++++++++

@Entity
@NamedQuery(name = "Employee.findAll", query = "select o from Employee o")
public class Employee implements Serializable {
    @Id
    @Column(nullable = false)
    private Long empno;
    private String ename;
    private Double sal;
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "MANAGERNO", referencedColumnName = "MANAGERNO")
    private Manager manager;
...

This looks correct to me. Right?

Thanks,

Mustafa
[Message sent by forum member 'mcayci' (mcayci)]

http://forums.java.net/jive/thread.jspa?messageID=231776