-
|
Hi there, I want to create API using SQL-Update class action with PUT method. Currently im using fusio 5.1.10. Is there a way to use database field name (example stock_id) for SQL-Update class action instead of "id"? If possible, i dont want to rename existing field name stock_id to id. Thank you for your reply. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
|
Hi @mrsibs in general the SQL-Update action dynamically detects the primary key from your table and uses this column, so there should be no need to rename your column s. The table infos are cached so you maybe need to clear your cache. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.


so it looks like everything works as expected s.
I have created your table and simply an entry with test/test and then I could update the value.
One thing which is important is that the path at your operation contains an
:idfragment which is required by theSqlUpdateaction, but this is only the uri fragment key and does not specify the primary key s.