Try creating a new namespace with the following dependencies:
(ns yourproject.path.kormastuff
(:use [korma.core]
[korma.db]))
Then create your entities as such:
(defentity items
(entity-fields :item))
I think you're probably hitting a wall because you are trying to alias a core and you are missing the db. It's much better to push this stuff into its own file and call the queries you want, with aliases if you chose, from other namespaces, ie:
(ns project.core
(:use [project.path.kormastuff :as kormadb]))
Then:
(select kormadb/items)
to get your results. That should work.
In the REPL, simply enter
items
into the command prompt to see the output Korma will give you. There should be no other fields showing up. If you run (select items) in the REPL it will show up everything whether you want that to happen or not. To get the real output you probably have to do a (format "%s" items) in a browser window or something.
If all that doesn't work, there's no shame in using the normal (select db (fields [:item])) clause. You'll find you'll be forced to destructure to use the information anyways.
EDIT:::::::
I'm sorry, I didn't explain myself clearly.
You aren't supposed to do
(select kormadb/items)
to get what you want. You only need to call the entity itself, so you only need to call items in the REPL, NOT (select items) in the REPL.
You would want to do something like
(def myQuery kormadb/items)
$ myQuery
and you will see that there are no other fields selected by default.
You can also do
(let [myQuery kormadb/items]
(format "%s" myQuery))
I'm modifying here, but what I get is similar to this:
{:table "items", :name "items", :pk :id, :db nil, :transforms (), :prepare
s (), :fields ("\"items\".\"item\""), :rel {}}
In order to use myQuery, you need to destructure the above hash-map. I'll leave that as an exercise for you to learn because destructuring is important and hard to learn unless you get your own hands dirty, but I'll give you a little place to start that won't give you an answer, but won't throw an error either:
(let [{myAlias :fields} myQuery]
(format "%s" myAlias))