I tested out following example from JPAContainer manual:
@Entity
public class Person implements Serializable {
@Id
@GeneratedValue(strategy=GenerationType.IDENTITY)
private long id;
private String firstname;
private String lastname;
private long version;
@Embedded
private Address address;
public Person() {
}
// setter and getter
@Embeddable
public class Address implements Serializable, Cloneable {
private String postalcode;
private String postoffice;
private String street;
public Address() {
}
// setter and getter
When setting table.setContainerDataSource(myEntityContainer) EclipselLink throws an Exception with following SQL:
Query: ReadObjectQuery(name="readObject" referenceClass=Person sql="SELECT ID, FIRSTNAME, LASTNAME, VERSION, POSTALCODE, POSTOFFICE, STREET FROM PERSON WHERE (ID = ?)")
No wonder that im getting an Exception, columns street, postalCode and postOffice cant be fetched from Person table.
What do I have to do to get this working? :wacko: