I am using subtable inheritance strategy to design my data store using JDO for my application hosted in google app engine. There are three types of users tha开发者_JAVA技巧t can logs into my app. these are the classes that I designed for this purpose 1) User(Abstract) 2)UserType1 extends User 3) UserType2 extends User 4) UserType3 extends User. Now the problem is every time I want to find an user based on the userId I have to check each entity kind separatly. It will become more problem when the user types increases. Please help how to design the model classes in this scenario.
Thanks
you're looking for JDO2's superclass-table inheritance technique. it works similar to the python app engine PolyModel class.
unfortunately, app engine doesn't support superclass-table right now. instead, consider consolidating all of the different class's fields into a single User class with a type enum.
精彩评论