Giter VIP home page Giter VIP logo

Comments (10)

bterlson avatar bterlson commented on September 1, 2024 1

I do think in practice it's common to have multiple foreign keys on an object, even when the entities they belong to themselves have a parent-child relationship. E.g. if kennel belongs to store and pet belongs to kennel, you will often find pets with both kennel_id and store_id, even though you can find the store_id through one indirection.

from cadl.

nguerrera avatar nguerrera commented on September 1, 2024

Why does this trigger unhandled promise rejection?

from cadl.

nguerrera avatar nguerrera commented on September 1, 2024

That probably escapes the new catch-all in the language server.

from cadl.

timotheeguerin avatar timotheeguerin commented on September 1, 2024

That was in the cli not language server, didn't check if it crashed that

from cadl.

nguerrera avatar nguerrera commented on September 1, 2024

Seems like there's a missing await somewhere too here?

from cadl.

daviwil avatar daviwil commented on September 1, 2024

Side note: do we want to support multiple keys per model type? We could get rid of the error entirely.

from cadl.

timotheeguerin avatar timotheeguerin commented on September 1, 2024

Someone was saying during the bug bash review that we were supposed to support that.

from cadl.

bterlson avatar bterlson commented on September 1, 2024

It was me! I thought I saw it was required when my model has two keys, like a pet with a store ID and group ID or something. But I see now we just use the parent model relationship so I was mistaken.

from cadl.

daviwil avatar daviwil commented on September 1, 2024

Honestly I don't see any reason why we couldn't use either approach. The code I've written is only really concerned with the order of the keys, it could generate a path just fine for a model type with two or more key properties, even if it has multiple parents.

from cadl.

markcowl avatar markcowl commented on September 1, 2024
  • this issue is about fixing the exception to make it a diagnostic
  • Adding a design issue for whether multiple keys can be valid for a resource

from cadl.

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.