Skip to content

How to initialize a model

macourtney edited this page Sep 13, 2010 · 2 revisions

Added for version: 0.6

To initialize a model, you must first use clj-record.boot in your namespace. Then you can add the following line to initialize the model:

(clj-record.core/init-model)

The above macro call with create a bunch of functions in your namespace for use interacting with your model.

Some of the functions included are:

  • get-record
  • find-records
  • find-record
  • create
  • insert
  • update
  • destroy-record
  • validate

See clj-record for more details.

Clone this wiki locally