fuel-indexer icon indicating copy to clipboard operation
fuel-indexer copied to clipboard

Make many-to-many entity saving more idiomatic

Open ra0x3 opened this issue 1 year ago • 0 comments

  • We previously added support for many-to-many (M2M) relationships https://github.com/FuelLabs/fuel-indexer/issues/947
  • As a quick win, we just implemented this via string hacking (here)
  • Now that this functionality is stable and works, we should make it a bit more idiomatic
  • We originally used string hacking over FtColumn because we didn't (and still don't) need a FtColumn::Object of serialized FtColumns, because we're merely saving references (i.e., IDs) of items, and not the items themselves
  • However, we should replace the string hacking with the use of FtColumn
    • Foreign keys should use FtColumn::ForeignKey

ra0x3 avatar Nov 07 '23 15:11 ra0x3