Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top