Mapping an xmin column using EF 5 Code First migrations

Mapping an xmin column using EF 5 Code First migrations

Postby jonsagara » Fri 30 Aug 2013 04:28

According to this thread, you support mapping to a table's xmin column using Entity Developer. I presume this works because you're pointing at an existing database.

Is it possible to map to xmin using Code First Migrations? How would you prevent the migrations from trying to create an xmin column instead of mapping to the xmin system column?

Thank you,

Jon
jonsagara
 
Posts: 1
Joined: Fri 30 Aug 2013 04:22

Re: Mapping an xmin column using EF 5 Code First migrations

Postby Shalex » Thu 26 Sep 2013 13:54

jonsagara wrote:How would you prevent the migrations from trying to create an xmin column instead of mapping to the xmin system column?

1. The name of the xmin StorageColumn in SSDL should be exactly the same as the name of the corresponding system column ("xmin").
2. You should use non-automatic code-based migrations. After migration is generated, open it and comment the line which creates the xmin column.

We have just sent a test project with the detailed steps to the e-mail address you specified in your profile. If you did not receive it, specify here an alternative e-mail.

Sorry for the delay.
Shalex
Devart Team
 
Posts: 7774
Joined: Thu 14 Aug 2008 12:44


Return to dotConnect for PostgreSQL