How to update a table using compound keys using Massive ORM?

Using Rob Conery Massive micro-ORM; Is it possible to work with tables with compound keys?

I cannot figure out how to assign more than one column name as "PrimaryKeyField". Has anyone done this? More specific; How to update () when the primary key consists of two columns?

+4
source share
1 answer

Found this comment on GitHub; https://github.com/robconery/massive/pull/50 - with the following comment from Rob;

(...) I had this discussion with others (using SubSonic) with, to be honest, this is more code than how I can use to support what I consider in the case of the edge (and not a terribly good database design for beyond many, many associations)

So it seems that composite keys are not supported. And I can fully understand the reasons for this. Fortunately, we control the database, so I believe that we can get around this by adding a surrogate key, and let the current composite key become a unique index.

+2
source

Source: https://habr.com/ru/post/1398997/


All Articles