This is a migrated thread and some comments may be shown as answers.

Concurrencty and version field set to timestamp

3 Answers 70 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jason
Top achievements
Rank 1
Jason asked on 15 Aug 2011, 04:27 AM
Hi Guys

I am trying to set up some tables with a concurrency mode of "Version" in the rlinq designer

to do this I
1) create a domain class with a field "rv" of type Int64 (as when i try Int32 it complains when i go to deploy to the server)
2) map this class to a table with a field "rv" of type bigint
3) map the class field to the table field.

When i go to deploy, the table in the database has rv of type timestamp. this just seems wrong as i have defined it as int64 and as far as I know you cant use timestamp for versioning.

Any assistance would be appriciated

3 Answers, 1 is accepted

Sort by
0
Zoran
Telerik team
answered on 16 Aug 2011, 08:02 AM
Hello Jason,

 This unfortunately is a behavior that we were not able to reproduce. In my test, I also created a table with a bigint column and mapped it to an Int64 property called RV. Then i selected the concurrency mode for the entity to be 'Version' and I selected the concurrency member to be RV. The SQL script generated by the Update Database From Model wizard was correct. Is there something we have missed, or could you give us more information on the scenario you are having or the exact steps to reproduce. Also, I used MS SQL Server for my testing.

Best wishes,
Zoran
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Jason
Top achievements
Rank 1
answered on 16 Aug 2011, 10:13 AM
Thanks for the reply. I worked out what I was doing wrong.

In the Edit / Create Dialogue, i was checking the "Version Field" Checkbox for the rv field. If i have that checked it seems to force the field to be a timestamp no matter what I have the SQL Type set to.

Cheers
Jason
0
Zoran
Telerik team
answered on 18 Aug 2011, 11:01 AM
Hi Jason,

 Yes that is definitely the cause. The issue is that when version is set on the column directly, this column is treated as a backend specific version column which for the SQL Server backend is a timestamp. However, setting the version setting on the property that is mapped to the column, means that OpenAccess will manage this property as the version property, thus using incremental Int64 numbers to set the version. We, on our side should put more effort to make this more transparent and better explained in the documentation. Thanks a lot for presenting this issue to us.

Best wishes,
Zoran
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
General Discussions
Asked by
Jason
Top achievements
Rank 1
Answers by
Zoran
Telerik team
Jason
Top achievements
Rank 1
Share this question
or