I have an inner class:
@Entity
public class InnerTypes implements Serializable {
private static final long serialVersionUID = 3839105307661662120L;
@Id
public int id;
public PrimitiveInnerTypes primitiveInnerTypes;
public PrimitiveInnerTypes getPrimitiveInnerTypes() {
return primitiveInnerTypes;
}
public void setPrimitiveInnerTypes(PrimitiveInnerTypes primitiveInnerTypes) {
this.primitiveInnerTypes = primitiveInnerTypes;
}
@Entity
public static class PrimitiveInnerTypes implements Serializable {
//some code ...
}
}
I have it on my persistence.xml as well
<class>pt.ptinovacao.persistencetester.model.InnerTypes$PrimitiveInnerTypes</class>
By using the $ sign (I think) I get the following exception:
[EL Warning]: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLSyntaxErrorException: unexpected token: INNERTYPES$PRIMITIVEINNERTYPES
I don't know how to fix, if I change the $ sign to a . I can't access the inner class because . is only for different packages. What can I do?
Thanks