korma / Korma

Tasty SQL for Clojure.
http://sqlkorma.com
1.47k stars 222 forks source link

Schema integration #348

Closed solatis closed 8 years ago

solatis commented 8 years ago

I am currently happily using Korma as my ORM for an API server I'm developing, but I'm looking to integrate the API docs and my data model a bit more.

Specifically, I'm using compojure-api for defining my api, which can provide instant apidocs for your API. However, there is one catch: it expects the schema definitions to be made using plumatic/schema

Other than writing a transformer between Schema and Korma's entity definitions myself, are there any thoughts on making this work properly, and/or has Schema been considered at all for Korma?

immoh commented 8 years ago

There are no plans for using Schema for entity definitions. As Korma doesn't use column type information in anyway I guess the only usable information would be relations. Or did you have something else in mind?

Personally I've been toying with the idea of a library that would create both queries and database schema migrations from Schema definitions but I don't think Korma will be changed to this direction.