users@glassfish.java.net

[Bug] _at_Embedded annotation break since b45

From: <glassfish_at_javadesktop.org>
Date: Wed, 04 Jul 2007 07:06:55 PDT

Hi,

I switch from toplink essential b45 to b50 and today to b54 and I found an error with @Embedded

I have an entity

@Entity
@DiscriminatorValue("3")
public class CentroFisico extends UnidadOrganizativa implements Serializable {
...
}

inside there is

private String telefono;

@Embedded
public Direccion getDireccion() {
        return direccion;
}
public void setDireccion(Direccion direccion) {
        this.direccion = direccion;
}

As the tables are created and i run a SQL to insert some data to start using the application, I get an error.

The problem is that JPA is inserting the fields from the embebable class in the physical table UnidadOrganizativa (the parent table of CentroFisico) and not in CentroFisico.

This works fine in b45 (and prior versions) , but in b50 and b54 (the two I tested) this fails and creates those fields in th parent table.

To upgrade to lastest versions I will need this problem fixed as this issue breaks our code.

Thanks.
[Message sent by forum member 'carlosrovira' (carlosrovira)]

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