Hi Koray Taylan,
For a start I'm recommending you our knowledge base
where you can find resources that can help you a lot in getting more familiar with our product.
As for your current problem, the Persistent
attribute is not inherited so you must specify all the classes in your hierarchy as persistent (you have to mark the m with the Persistent
attribute). Also you can make your base class abstract
and the id
field protected: that way it can be used as identity for the derived classes. If I understood correctly you don't require a predefined table for the base class (you dont develop the db schema first). For that reason you can go with the forward mapping wizard where you select (in the tree view on the left) the base class and in the inheritance section you select strategy
to be horizontal
After that you select every derived class and in the Identity
section select Type: Single Field
, ID Field: BaseClass.id
(or your desired id field) and Key Generator: AUTOINC
. That way you will get a single table for every derived class with all the fields from the base class and the id field as auto-incrementing key generator.
I hope this helps you. If there are more questions regarding the discussed problem, send us more details on the topic or even send us your sample project.
the Telerik team
Check out Telerik Trainer
, the state of the art learning tool for Telerik products.