Mapping an xmin column using EF 5 Code First migrations

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
jonsagara
Posts: 1
Joined: Fri 30 Aug 2013 04:22

Mapping an xmin column using EF 5 Code First migrations

Post by 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

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

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

Post by 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.

Post Reply