Hi,
I used OpenJPA because I can't realized the mapping with annotations.
So I use the orm.xml for my mapping.
Now my Problem: I have an other class in my entity which contains an other
class.
But I can't found the embedded element in an embedded element into
orm_1_0.xsd.
How I can write this
I am porting an application to container-managed JPA.
In my EJB, I now have a function that does something like this:
function CreateAccount() {
Person p = new Person();
Address a = new Address();
...
em.persist(p);
em.persist(a)
...
}
In my Web page that uses the EJB, I have added a
Does anybody have a concrete example of how to map an enum with fixed
ordinal numbering? I have a DB which has an numeric column where the
existing values mean something. I want to map that to an Entity
attribute of some enum type.
Reading
Here is an example:
@Entity
public class EntityA {
@Id private int id;
@Enumerated( EnumType.ORDINAL )
private Measure measure;
public Measure getMeasure() {
return measure;
}
public void setMeasure(Measure measure) {
this.measure = measure;