开发者

Objectify Inheritance without Polymorphic Queries

开发者 https://www.devze.com 2023-03-11 01:37 出处:网络
I have class A and class B (which extends A). I\'d like to store them both as the same entity type WITHOUT using the @Subclass keyword. I don\'t want to use the polymorphic queries (for now) because i

I have class A and class B (which extends A). I'd like to store them both as the same entity type WITHOUT using the @Subclass keyword. I don't want to use the polymorphic queries (for now) because it is fairly new and I don't want to have an extra field in my entities.

Ideally class A and class B are both stored as entity type X and contains a superset of the fields of class A and B. I'll also store a "type" f开发者_JAVA技巧ield in class A so that I can emulate the polymorphic queries. Whats the best way to do this using objectify????

Thanks!

0

精彩评论

暂无评论...
验证码 换一张
取 消