 
 (defmacro init-model [model-name & options]
   (let [optional-forms (defs-from-options model-name options)
-        model-name (.getName model-name)]
+        model-name (name model-name)]
     `(do
       (defn ~'table-name [] (table-name ~model-name))
       (defn ~'find-record [id#]


(defn table-name
  ([model-name]
    (if (string? model-name) model-name (.getName model-name)))
  {:test (fn []
    (are (= (table-name _1) _2)
      "foo" "foo"
      'foo "foo"
      :foo "foo"))})

(defn find-record [model-name id]
  (sql/with-connection db

  (:require [clojure.contrib.sql :as sql])
  (:use clojure.contrib.str-utils)
  (:use clojure.contrib.test-is))


(defn singularize 
  ([plural] (re-sub #"s$" "" plural))
