Skip Java8 synthetic methods in model scan
Scanning did not ignore synthetic methods created by java8, leading to
errors when methods from Access interface were overridden.
Change-Id: I598df34aef9abfed436c70cb3f36948456116603
diff --git a/src/main/java/com/google/gwtorm/schema/java/JavaRelationModel.java b/src/main/java/com/google/gwtorm/schema/java/JavaRelationModel.java
index 4778663..3a06407 100644
--- a/src/main/java/com/google/gwtorm/schema/java/JavaRelationModel.java
+++ b/src/main/java/com/google/gwtorm/schema/java/JavaRelationModel.java
@@ -78,6 +78,9 @@
private void initQueriesAndKeys() throws OrmException {
for (final Method m : accessType.getDeclaredMethods()) {
if (m.getAnnotation(PrimaryKey.class) != null) {
+ if (m.isBridge()) {
+ continue;
+ }
if (m.getReturnType() != entityType) {
throw new OrmException("PrimaryKey " + m.getName() + " must return "
+ entityType.getName());