Mapping non-trivial Postgres columns

Thank you @Guillaume_Cisco !

The \\b(?!count\\b) did the trick. I have no idea what it actually does, but it was the missing piece.

I had to do two things different than you:

  1. I kept the type DataTypes.INTEGER to have only the range displayed in the UI: [1,100).
    If I change it to DataTypes.ARRAY(DataTypes.INTEGER) then it is displayed as array: [[1,100)]. But the bigger issue is that editing becomes tricky. In fact, I couldn’t make it work.

  2. I had to add a similar code to the put route. Otherwise, it goes back to [object Object],[object Object] after the update.

With those in place, it now works nice. Obviously, it would be great if you at some point introduce a nice UI for ranges, but the way it is now is sufficient for what I need.

Thank you for taking the time to help me with that!

1 Like