Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Surya Asriadie
    @Fs02
    REL v0.17.0 is released with API changes, please read this for upgrading instruction https://go-rel.github.io/changelog/upgrading/#upgrading-from-016x-to-017x
    Nikolai Strässle
    @nikolaistraessle
    Hi everyone, I have a question: I'm trying to search for an entity with an association. On the entity, the association should be automatically preloaded, because I set the tag auto:"true". If I want to test that, the error panic: rel: primary key row does not existsappears. How can I test finding an entity with automatically preload an association?
    Surya Asriadie
    @Fs02

    hmmm, when preloading, scanMany function is expected to be returned byCursor.Fields https://github.com/go-rel/rel/blob/f031f7a81ccff9b35afa611afcc63b130ed51901/cursor.go#L83-L85

    but since nopCursor that is used by reltest package doesn't returns any field, it triggers that error
    https://github.com/go-rel/rel/blob/f031f7a81ccff9b35afa611afcc63b130ed51901/reltest/nop_adapter.go#L79-L81

    easy fix would be to update the condition so it doesn't panic when field is nil or no row is returned
    Surya Asriadie
    @Fs02
    should be fixed in: go-rel/rel#183
    Nikolai Strässle
    @nikolaistraessle
    Many thanks, I will test the fix as soon as it will be released.
    Surya Asriadie
    @Fs02
    it has been released, hope it fixed id https://github.com/go-rel/rel/releases/tag/v0.18.0
    Nikolai Strässle
    @nikolaistraessle
    @Fs02 I've tested your fix and can confirm that the tests are now running. Many thanks for that improvement.
    bn4t
    @x:bn4t.me
    [m]
    Hi, I have a problem that nested slices (struct slice inside of struct slice) only get filled in to the first level but not deeper. Does anyone know if this is a limitation of go-rel?
    Surya Asriadie
    @Fs02
    @x:bn4t.me do you have example?
    bn4t
    @x:bn4t.me
    [m]
    Fs02 (Muhammad Surya): It‘s no longer something that‘s really affecting me, but an example would be a struct slice inside of a struct slice which is inside a struct and then the top level struct is filled in with go-rel.
    Surya Asriadie
    @Fs02
    @x:bn4t.me I see, insert/updating associations inside a has many (slice) is currently not supported in REL because of implementation complexity
    bn4t
    @x:bn4t.me
    [m]
    I see. Thanks for the response