Can't import clojure records
Posted
by
Zubair
on Stack Overflow
See other posts from Stack Overflow
or by Zubair
Published on 2011-01-02T20:50:26Z
Indexed on
2011/01/02
20:53 UTC
Read the original article
Hit count: 147
clojure
I have created a record like this:
(defrecord User [user-id email])
:but when I try to access it from another name-space I get the error:
(User. "name" "email")
java.lang.IllegalArgumentException: Unable to resolve classname: User
It works when I do:
(oe.model.modelcore.User. "name" "email")
: I know I will need to import the Java class, but is there any way for clojure to do this automatically when I do:
(use 'oe.model.modelcore :reload)
© Stack Overflow or respective owner