I have a database table that has a huge amount of columns. I want to access that table using different JPA Entities, so each entity should also represent a few columns of that table. Therefore I created two different @Entity classes which point to the same physical table using @Table(name ="personal") annotation. But this doesn't seem to work. As soos as I set the second Entity to the same table I get the following error whenever I try to work with those entities:
javax.persistence.Table.indexes()[Ljavax/persistence/Index; java.lang.NoSuchMethodError
So, this seems to be the wrong way.
What's the best way to deal with realy large tables if 90% of the columns are not of interrest ? Is it possible to create several JPA Entity classes for the same database table ?
thanks for any help! Thorsten