Hello @blakesmith (and @citizenparker)
Wow, I was so happy to find this library!
I tried to use it, but ran into issues. The writes into the DB worked fine,
but the read path back from Postgres -> JDBC -> Korma -> pghstore didn't work.
Somehow, what was getting passed to from-hstore was a java.util.HashMap, not a
org.postgresql.util.PGobject, so no implementation of from-hstore was found for java.util.HashMap.
Has there been a change with one or more "links in the chain" above?
I am running:
Anyway, I didn't take the time to really dig into this to understand what the issue was.
I simply threw together a very quick and dirty implementation of from-hstore for java.util.HashMap, which is here in my pull request, just FYI. I'm not claiming my code is the best or right way to do this, if in fact this needs to be done at all...
I'm pretty sure I am unblocked for now, but it would be great to get some more knowledgeable perspective from you guys on this....
Extended java.util.HashMap with FHstorable
@dcj Hmm, can you post the code from Korma that was calling from-hstore? That seems very odd. I've used it in environments identical to yours but for the Clojure version with no problem.
I define my entities like this:
(prepare #(update-in % [:details] to-hstore))
(transform #(update-in % [:details] from-hstore))
(prepare #(update-in % [:location] to-hstore))
(transform #(update-in % [:location] from-hstore)))
I then 'use this file/namespace in another file/namespace where I define a number of functions for interacting with
this DB table:
(:require [korma.core :as korma]
And here I define functions like "create", "read", and update for my table.
Then in other code, I require this filem
(:require [likestream.db.pg.businesses :as business])
And then call things like
If this is not enough info to understand why I am having this issue, I can create a small test repo/app
to attempt to reproduce the issue in a small example....
Can't remember :-(