Netflix / astyanax

Cassandra Java Client
Apache License 2.0
1.04k stars 355 forks source link

Entity mapper do not work with extended classes #585

Open evilezh opened 9 years ago

evilezh commented 9 years ago

So ... I've superclass A with some pre-defined stuff and I've class B which extends and has few extra fields. If I use class B - it can't find a table name, id fields and other ones defined in superclass.

some part of stack trace where id field is defined in superclass: Exception in thread "main" java.lang.NullPointerException: there are no field with @Id annotation at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:226) at com.netflix.astyanax.entitystore.EntityMapper.(EntityMapper.java:125) at com.netflix.astyanax.entitystore.DefaultEntityManager$Builder.build(DefaultEntityManager.java:179) and $ java -version openjdk version "1.8.0_45" OpenJDK Runtime Environment (build 1.8.0_45-b14) OpenJDK 64-Bit Server VM (build 25.45-b02, mixed mode)