 
 (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#]

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

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


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

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