Not sure, maybe i missed it, but is DO 4.0 designed to be used on existing databases?

If yes, it is also possible to make the mapping configurable (some customers have more / less fields that need to be mapped)

Thanks Marco

This thread was imported from our support forum. The original discussion may contain more detailed answer.

asked Dec 24 '08 at 11:43

Marco's gravatar image


One Answer:

Yes, it is. But currently there are few limitations:

  • For now DO always creates TypeId column - even if it isn't needed (e.g. when a sealed class is mapped to a table). This isn't a technical limitation, i.e. we'll fix this when more important things will be done.

  • If you need inheritance mapping, you MUST "migrate" to our TypeId column. I.e. we support a single Type identifier (key): integer.

Concerning mapping configuration: we build model in two steps now:

  • Build *Def objects (TypeDef, FieldDef, etc.) by specified types and attributes - they provide lightweight, read-write Domain model

  • At this point you can change, add or delete these *Def objects - use DomainConfiguration.Builders property & IDomainBuilder

  • Build Info (TypeInfo, FieldInfo, etc.) objects describing the final model. It is built solely by Def model. Model validation is also performed on this step.

So basically you can implement any model\mapping change logic you need.

Kind regards, Alexander Yakunin The President of Xtensive LLC

answered Dec 24 '08 at 11:44

Alex%20Yakunin's gravatar image

Alex Yakunin

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview


Once you sign in you will be able to subscribe for any updates here



Asked: Dec 24 '08 at 11:43

Seen: 5,638 times

Last updated: Dec 24 '08 at 11:43

powered by OSQA