Remove Data with triple Primary Key

Short question.

My table has thie Primary Key: (EventqueueID, EventID, SubscriptionID)
There are two Foreign Keys: EventID, SubscriptionID

My Entity is TPubEventqueueProcess

Now I want to delete one Dataset. I have the 3 Keys.

Is this the right way?

Ok, I think about to make a new Field that is my new Primary Key. Only one Field.

The ID's are all TGuid



        LEventqueueProcess                             := TPubEventqueueProcess.Create;
        LEventqueueProcess.EventqueueID                := AProcessRec.EventqueueID;


        LEventqueueProcess.Event                       := TPubEvent.Create;
        LEventqueueProcess.Event.EventID               := AProcessRec.EventID;


        LEventqueueProcess.Subscription                := TPubSubscription.Create;
        LEventqueueProcess.Subscription.SubscriptionID := AProcessRec.SubscriptionID;


        LSession := TDBSession.Create( TdmDatabasePub(dmDatabase).DBConnection);
        LSession.objManager.Remove( LEventqueueProcess);

I hope the names are all self-explanatory

Hi Thomas,

Yes, that will work, but first you need to "put" the object in the manager:


Session.objManager.Update(LEventqueueProcess)
Session.objManager.Remove(LEventqueueProcess)

FIne, thank you.