playframework/play1 — pull request #791 by ryenus (2014-08-15 16:38:49+00:00)
Title: skip static fields when building properties list

There's a static field in my entity class, which caused the following exception when loading data using `play.test.Fixtures.loadModels`:

> java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.WildcardTypeImpl cannot be cast to java.lang.Class
at play.db.jpa.JPAPlugin$JPAModelLoader.buildProperty(JPAPlugin.java:794)
at play.db.jpa.JPAPlugin$JPAModelLoader.listProperties(JPAPlugin.java:543)
at play.test.Fixtures.resolveDependencies(Fixtures.java:440)
at play.test.Fixtures.loadModels(Fixtures.java:206)

Though adding `transient` modifier or the `@Transient` annotation both can avoid the error, I think `static` itself should be sufficient to get the field skipped.

Here is a related discussion: https://forum.hibernate.org/viewtopic.php?f=9&t=938860&start=0