Git Product home page Git Product logo

Comments (3)

josephschorr avatar josephschorr commented on August 17, 2024

This is problematic when we try to update an existing relation with a caveat later on because the sql check (caveat_name <> 'some_caveat_name') fails for a null value.

Are you making changes directly to the relationships table? If so, this is completely unsupported and can cause inconsistency and/or straight bugs.

from spicedb.

heissa83 avatar heissa83 commented on August 17, 2024

This is problematic when we try to update an existing relation with a caveat later on because the sql check (caveat_name <> 'some_caveat_name') fails for a null value.

Are you making changes directly to the relationships table? If so, this is completely unsupported and can cause inconsistency and/or straight bugs.

No we dont. If we try to update a relationship through the WriteRelationships endpoint, set the update method to Touch and add a caveat to an existing relationship.

This works for a "normally" written relationship, because the caveat_name is an empty string. But if this relation was backuped and restored (or written through the bulk load api) then the caveat_name in the database is null. The SQL created in the code uses the <>operator to check the name and this fails for null values.

from spicedb.

josephschorr avatar josephschorr commented on August 17, 2024

@heissa83 Ah, ok. Just making sure :)

from spicedb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.