문제

I have a project that the client want me to re-use (by sharing src directory directly) their existing JPA-annotated classes on Android. I would like to use ormlite in my project (despite the underlying DB will be H2) but the classes use some JPA annotations that ormlite does not support (@IdClass with composite primary key object, entity with multiple @Id columns, @OneToMany).

My question is, Will configuring the classes using Java code override the JPA annotations? Or is there other ways around this? Thanks.

도움이 되었습니까?

해결책

By passing in a DatabaseTableConfig<T> during dao initialization, the table config takes precedence and all JPA annotations are ignored. So the answer to my own question is YES, it will override JPA annotation.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top