I have a problem when I try to persist an Entity Bean with 1 attribute that is an Object. I search on the web but i don't find nothing. At the end i think it's not possible but I'm not sure.
@Entity
@Table(name="TEST")
public class StatisticaVoto implements Serializable
{
private int id;
private Object o1;
private Object o2;
public StatisticaVoto() {}
public StatisticaVoto(Object o1, Object o2)
{
this.o1 = (Integer)o1;
this.o2 = (Integer)o2;
}
@Id
@GeneratedValue
public int getId()
{
return id;
}
public void setId(int id)
{
this.id = id;
}
public Object getO1()
{
return (Integer)o1;
}
public void setO1(Object o1)
{
this.o1 = (Integer)o1;
}
public Object getO2()
{
return (Integer)o2;
}
public void setO2(Object o2)
{
this.o2 = (Integer)o2;
}
}