Hi,
I have a few questions regarding migration from 4.6 to 5.0 (5.0.6.1387):

Where is the documentation regarding Dataobjects 5.0 ? The version online seems to be a copy of 4.6

What do we do with [Transactional] and [NonTransactional] attributes ?

How to upgrade 'enum' columns ? The database columnname seem to have changed in DO 5 from 'Type.MyEnumField' to 'MyEnumField'. Example : I have a type 'Request' with a column 'State' of type 'RequestState' (enum). This column was mapped in SQL in 4.6 as 'Request.State', it is now mapped in SQL in 5.0 as 'State'.

Xtensive.Orm.Security can't upgrade from 4.6 to 5.0 (I fixed it temporarly editing the value in Metadata.Assembly

TransactionScope.Transaction.ValidationContext doesn't exist. What is the replacement ?

Same for Session.Current.DisableValidation(), what is the replacement ?

Others points regarding upgrade tp DO 5.0 I solved already :

PropertyConstraintAspect -> PropertyValidator

To use Postsharp 2 with DO 5.0, include PostSharp.targets before dataobjects.targets

2) TransactionalAttribute and NotTransactionalAttribute are based on PostSharp. Due to PostSharp is no longer in use we removed them. In 5.0.x there is no something simmilar.

3) Enum fields has same names in 5.0 and 4.6. By default enum field Company.CompanyType will generate column with 'CompanyType' name of 'Company' table. Are there any [FieldMapping] attributes on those enum fields? If so, then you can keep mapping. DO might resolve it if names of fields are same.
4) You don't have to do it manually. DO checks registered assemblies. If any version of assemblies then DO try to find upgrader. Write something like

public override string AssemblyName
{
get { return Assembly.GetName().Name; }
}
public override bool CanUpgradeFrom(string oldVersion)
{
// you can filter specific versions of assembly here.
// this implementation will be used for upgrade from any versions
return true;
}

Validation framework was reworked very much so, unfortunately, there is no access to ValidationContext (it is another ValidationContext now), also there is no any replacements for Session.DisableValidation(). If field has Constraint it will be validated on transaction committing or on changing of field value.

What for do you use ValidationContext and Session.DisableValidation() in 4.6? Maybe I can find some workaround for you.

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)!