[web-devel] (Yesod) PersistEntity Key types
rick.richardson at gmail.com
Sun Apr 3 00:57:43 CEST 2011
I ran into another snag getting the tests running for MongoDB backend. The
PersistEntity class, and, it appears, the TH is hardcoded to set the key
type as Int64.
This is a problem since the key type in MongoDB is a 12 byte blob.
The other problem is that it looks like PersistBackends are pretty much
hardcoded to that type as well. I guess the correct approach would be to
allow the designation in mkPersist and then ensure that the PersistBackends
can parametrically deal with differing Key types. Or, in the case of
MongoDB, hardcode it to a 12 byte blob, because other key types (ObjectId's)
rarely make sense.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the web-devel