Peter Buchmann
Peter Buchmann

Reputation: 177

MDriven Framework custom OR mapping for inheritance

I use the MDriven framework with custom OR mappings. The mapping mappens in a XML file which contains several classdefs and the database definition with the mapped tables.

As for now I have a 1:1 mapping between tables and classes. How does mapping of inheritance work in the mapping file?

My specific problem is a abstract base class which has "Children" mapping and two inherited classes that are mapped into a specific table each. A solution for this specific mapping case would help, but a general documentation of the mapping file and the different mapping types would be great.

Alternatively an answer to following question would also help: How can I generate a OR-mapping file for a default mapped model from the MDriven PersistanceMapper? The question above could then be reconstructed from the default OR mapping.

Upvotes: 1

Views: 103

Answers (1)

Hans Karlsen
Hans Karlsen

Reputation: 2435

Easiest way to look at the ORMapping: Start MDriven Designer - create a simple model - save it

Prototype by pressing play, choose SQL-persistence, pick a SQLExpress database, SQLCompact Create database, Save script. Look in the database for table ECO_ORMapping - here you have the ORMapping script

Alternative: Create a turnkey site - upload model, in cloud dialog choose "Admin db access and swap", Snapshot admin db, download admin db. You can open this db (sqlcompact) with linqpad

Upvotes: 0

Related Questions