How to encode composite keys in SailsJS

I have a question about SailsJS. How much research I have done, I have yet to find any meaningful examples or explanations for composite keys in SailsJS. From what I have done, I have learned that you absolutely need to do some workaround to get the composite keys to work in SailsJS, however I do not fully understand or am following the small examples I found on the internet. If someone takes the time to explain them, or give an explicit example, I would be very grateful.

+3


source to share


1 answer


this is probably already set here: Sails.js Pivot Unique Field

And like talking to a problem on git - this is best done in an actual DB and not live in code ... if it can't be done for any of your use cases, this will ensure that best practice is reversed, then code whatever works best for your needs ... this is not the "wrong" answer to needs that sometimes drive you to the brink :)



If you have a specific question, feel free to edit your question with these questions, and perhaps a better explanation of composite keys can be provided.

+1


source







All Articles