64
Views
7
Comments
Update Entities Data with API
Question

I have some entities in my database. One of them is Profile entity. So, if sometimes profile entity must be updated, what i need to advanced sql with function update ? or just make in the API like this ?

Thanks for your answer.

2025-01-09 14-56-57
IQ78

yes, you can use that entity action, no need for advanced sql.

regards,

bb

2017-09-26 04-22-30
fahmi fachrurozi

Barong Bali wrote:

yes, you can use that entity action, no need for advanced sql.

regards,

bb


Hi Barong Bali,

Thank for you answer. But, if i have been updated the data, did the data successfully get in on the database ?


2025-01-09 14-56-57
IQ78

yes, it will be commited, unless there is an exception thrown, the transaction will be rollback.

regrads,

bb

2017-09-26 04-22-30
fahmi fachrurozi

Barong Bali wrote:

yes, it will be commited, unless there is an exception thrown, the transaction will be rollback.

regrads,

bb


hi Barong Bali,

how about this ? can u expalin to me simply ?

2025-01-09 14-56-57
IQ78

Sure,

The First one.. Create orUpdatePosting- it will create a new records, just in case the primary key is not exists (if there is no same ID attribute), and will update the old record if there is the same ID (key).

The second one... GetPostingForUpdate.. it will lock a record you are going to update such that no one else can update it until you release the lock (by commit action, for example).

regards,

bb

2020-09-15 13-07-23
Kilian Hekhuis
 
MVP

Hi Fahmi,

The "GetXxxForUpdate" will fetch the current record and lock it. See here for more info*. You typically don't need to use that, unless you are in a high transaction environment where there's a big chance your data is being changed and you need to handle that.

*It's for 9.0, since I couldn't quickly find the P10 page, but it's still valid with regards to the behaviour.

2018-11-06 14-26-44
Suraj Borade

Thanks guys it refreshed my knowledge about GetXXXForUpdate.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.