biggora / caminte

Cross-db ORM for NodeJS
http://www.camintejs.com/
MIT License
1.08k stars 119 forks source link

Composite primary key #213

Open haroldo-ok opened 4 years ago

haroldo-ok commented 4 years ago

A quick question: are composite primary keys supported? Is it possible to make relations using those?

I'm asking this because we need to connect to a Firebird database that uses plenty of composite keys, and it has to be able to run alongside the existing lagacy system, so database refactorings won't be viable.

Also, is FB dialect 1 supported, or is it dialect 1, only?

fijiwebdesign commented 4 years ago

@haroldo-ok I don't believe there is composite key support. I'm using this for MySQL and haven't been able to use composite keys.

Also, I would suggest using another ORM as this project is no longer maintained for quite a while now. The last commit is: May 4, 2018

It has been the source of pain for one of the projects I'm working on that is using it (for over a year). At some point we will need to do a refactor to remove caminte.

haroldo-ok commented 4 years ago

Many thanks; I had also guessed as much; the only remaining options for Firebird ended up being:

In both cases, it was necessary to fix bugs on the unnoficial implementations, in order to make them work, but work, they did. I guess that's business as usual for legacy support...

fijiwebdesign commented 4 years ago

Keeping an unofficial driver updated seems much less risky than an unofficial fork.

If you're going to invest heavily in the ORM then most likely you won't be able to foresee the implementation details and bugs. I've come to the conclusion that for large projects it's better to avoid an ORM and build on knowledge you see in the drivers as examples. Build your own "ORM" as you go along.

The general sense I get is that:

A few things that costs dev time with caminte ORM was:

Look out for these in the ORM you choose.