This is a migrated thread and some comments may be shown as answers.

How to engineer the table's fields to multiple objects?

1 Answer 68 Views
Getting Started
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Gabor
Top achievements
Rank 1
Gabor asked on 02 Mar 2010, 11:27 PM
Hi All,

Is it possible to reverse engineer some columns of the tables to one class, and some to others?

For example: I have a customer table, and want the city, street, zip etc. columns to be mapped to an address object.

So more classes than tables.

Is it possible to forward engineer in the same manner, ie. different classes to map to the same table?

The designers unfortunately don't allow this,

When I try to manually edit the config files, in the reversemapping.config I can set to map some columns to different classes, but in the app.config how can I set the fields to be mapped to the tables with different name than the class?

NHibernate allows this, does the OA has the same facility?

Thanks in advance

Gabor


1 Answer, 1 is accepted

Sort by
0
Ady
Telerik team
answered on 08 Mar 2010, 02:01 PM
Hello Gabor,

 OpenAccess allows you to store 1 class across multiple tables and multiple classes in 1 table, but only when these classes are part of an inheritance hierarchy. The Revesre mapping wizard currently doesn't provide inheritance mapping but this is something that we are working on and it would be available in the Q1 release. The Forward mapping wizard supports all inheritance mapping strategies.

 It is not possible to map 1 table to 2 unrelated classes.

 All the best,
Ady
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Getting Started
Asked by
Gabor
Top achievements
Rank 1
Answers by
Ady
Telerik team
Share this question
or