Updating Composite Id entity id value

If I have composite id like
[ Entity, Automapping ]
[ Id( 'Ffield1', TIdGenerator.None ) ]
[ Id( ' Ffield2', TIdGenerator.None ) ]
TTable = class
Ffield1: string;
Ffield2: string ;
Ffield3: nullable< string >;
should it be possible to update value Ffield2 (which is part of primary key)or should I delete and insert records?
Accoring to my test I got sql update table set field3=NEWVALUE, field2 = NEWFIELD2VALUE where field1=FIELD1VALUE and field2=NEWFIELD2VALUE
of course there is possiblity that this can cause a duplicate key error, but should this work?

It's not possible as this will cause issues with the TObjectManager way of caching and mapping the objects. For that you would have to execute an SQL statement directly to modify such value.

Thanks, Thought so bad had to make sure. In this case it's easier to remove and insert.

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.