Print Page | Close Window

Could primary key/entity key value been modified?

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2009
Forum Discription: For .NET 3.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1435
Printed Date: 11-Apr-2026 at 8:12pm


Topic: Could primary key/entity key value been modified?
Posted By: Suah
Subject: Could primary key/entity key value been modified?
Date Posted: 20-Aug-2009 at 9:50pm
Could primary key value/entity key value been modified?

My invoice is created with negative value INV_NO, and want to change it to be positive after posting?
Maybe I just create a new field to indicate the status instead of using this?



Replies:
Posted By: davidklitzke
Date Posted: 26-Aug-2009 at 11:21am
Typically, primary keys are negative numbers that are converted by the IIdGenerator to positive values when they are saved
 
If you want the conversion to happen before the Save, you can use the ForceIdFixup method of the Entity Manager.



Print Page | Close Window