hibernate @Entity on inner class only (top level class is not an @Entity)
问题 I would like to persist inner class into database. But it dosnt work. Is there possibilty to do that? Or should i put that inner class into new plain file? Now I am getting an error [IllegalArgumentException: Unknown entity: models.foo$bar] My class file: package models; public class foo { @Required public String report; @Required public String reportType; @Entity public static class bar{ @Required public int year; @Required public int month; public void toDataBase() { JPA.em().persist(this);