Master/detail and sequence on sqlserv

i've a sequence ('SEQ_DOC_PK1') created on sqlserv that i use on a table to provide ID number. After i created an entity server side :

[Id('FPK_1', TIdGenerator.IdentityOrSequence)]
TDOC_MOV_MAG_T = class
[Column('PK_1', [TColumnProp.Required, TColumnProp.NoInsert, TColumnProp.NoUpdate])]
FPK_1: Integer;

Client side with XDataWebDataset how can i get sequence value in order to have a M/D relation with a detail dataset ?


The generated ID is returned normally in the field. But a Master/Detail relationship using objects is not by ID, but by instance.
TXDataWebDataset doesn't support Aurelius entities, so I'm not sure exactly what you are trying ask. In TMS Web Core, objects are regular JavaScript objects, and the master/detail relationship supported by TXDataWebDataset is at object level, i.e., your JavaScript object representing TDOC_MOV_MAG_T should have a Items property which holds an array of item/child objects.

can i use datawebclient.RawInvoke to get the sequence value with 'SELECT NEXT VALUE FOR SEQ_DOC_PK1' on server side ? is a better way ?

My way is 'thinked' to manage users concurrency too ... can you suggest other way ?

I'm sorry, but I don't understand exactly what you are asking. Can you please be more specific?