Enum property in nested object creating error in UI for related data record details

Expected behavior

I have a model such as :

const PaymentSchema = mongoose.Schema(
    orderId: {
      type: mongoose.Schema.Types.ObjectId,
      ref: 'order'
    schedules: [
        method: {
          type: Number
          enum: [1, 2, 3]
        amount: Number,

Thus, schedules are displayed as related data in the UI as list. However, the UI cannot display the record details inside the record view of a schedule because it cannot manage the enum option of the method field.

Actual behavior

Schedules displayed in list:

Record detail view bugging: no error in logs but in console:

To display record details I have to remove the enum option on the model.

Could you fix this, so we don’t have to change our model?

Version details:

"database_type": "MongoDB",
    "liana": "forest-express-mongoose",
    "liana_version": "6.3.8",
    "engine": "nodejs",
    "engine_version": "12.19.0",
    "framework": "other",
    "framework_version": null,
    "orm_version": "5.9.4"

Hi @guillaumejauffret,

Thank you for this interesting feedback.
I’ve just reproduced your case, effectively it would be nice to have enum working even in related data.

I’ve created a bug ticket in order to solve this as soon as possible.
For now I can’t tell any ETA but this will gives you information about the progress here:

1 Like

@Sliman_Medini , moreover, the data of the related data is updatable in the UI whereas I indicated is was read-only.


Can you prevent related data to be updatable in this case and enable update through a smart action in order to implement some validations.


Hello @guillaumejauffret,

Thank you for the update.
I added your recommendations to our tasks board.

We will address this issue as soon as possible.

1 Like