BUG - Mongo _id + postgres id in same table

Feature(s) impacted

Edit action

Observed behavior

Edit adds id to payload even if it’s read-only fields. Stange behavior is occurring in View Mode, _id field has the value of id field, not in Edit Mode

I can provide screenshots and further explanations in private messages.

Expected behavior

Edit/create must not include read-only fields or Ids (primary) fields

Context

  • Project name: Plezi One
  • Team name: Plezi
  • Environment name: All (Production)
  • Agent type & version: Ruby forest_liana (7.7.0)
  • Recent changes made on your end if any: none

Hello @Nicolas_Kovacs,

Thanks for your feedback. Can you please describe in more details how we could setup a project and reproduce your issue on our end? I’m not sure to understand everything.

Screenshots would be welcome, as well as a description of the collection and fields involved in your issue.

It seems that there is an issue when a model or table includes 2 fields with these names: id and _id.

  • The default display name for _id is id.

  • In View mode value of _id is wrong (it takes idvalue).
    1

  • In Edit mode, the values appear correct.

  • However, when updating a field, an error (a SQL constraint in our case) occurs because the query generated by the admin performs an update on the id. This is included in the payload, which should not be the case.

Hello @Nicolas_Kovacs

I can reproduce on my end. We will be working on a fix and I’m coming back to you when its released.
Sorry for the inconvenience.

Best regards,
Nicolas

Hello @Nicolas_Kovacs,

Could you please tell me what is your primary key (id or _id)?

And out of curiosity, why do you have both identifier fields?

Thanks.

Hey @anon34731316, our primary key is id
We have _id because we migrated from MongoDB to PostgreSQL and it was the dedup key (mongo primary key). It’s temporary.

1 Like

Hello @Nicolas_Kovacs,

Thanks for your last reply :raised_hands:

Just thinking: to unlock you faster, how doable will it be for you to rename the _id field to something like mongoId or something else?

Hello @anon34731316,

It’s not really possible for now, because we have many many tables. We will wait for the fix.

Hello @Nicolas_Kovacs

The issue has been fixed

Best regards,
Nicolas