On Oct 23, 9:44 pm, Shantanu Kumar wrote:
> How about using protocols to fetch metadata? SQLRat uses this
> approach:http://bitbucket.org/kumarshantanu/sqlrat/wiki/tutorial/EntityDefinition
Adding extra fields to mapped records is looking like the best
solution to what I'm trying to accomplish.
On Sat, Oct 23, 2010 at 5:44 PM, Chris Dow wrote:
> Is there any way to attach Clojure defined 'metadata' to to types? I
> am trying to write a ORM for records and would like some way to attach
> 'metadata' to types for the sake of mapping configuration. Clojure's
> built-in metadata apppears t
On Oct 24, 2:44 am, Chris Dow wrote:
> Is there any way to attach Clojure defined 'metadata' to to types? I
> am trying to write a ORM for records and would like some way to attach
> 'metadata' to types for the sake of mapping configuration. Clojure's
> built-in metadata apppears to be intende
Is there any way to attach Clojure defined 'metadata' to to types? I
am trying to write a ORM for records and would like some way to attach
'metadata' to types for the sake of mapping configuration. Clojure's
built-in metadata apppears to be intended only for instances of
types. I could use Java
On 27.03.2009, at 22:25, srader wrote:
> Thanks for the explanation and the patch. But instead of patching
> print-method, maybe vary-meta should be patched to handle refs?
That doesn't make sense to me. vary-meta takes a value object and
returns another value object with identical value but d
Thanks for the explanation and the patch. But instead of patching
print-method, maybe vary-meta should be patched to handle refs?
Scott
On Mar 27, 7:07 am, Konrad Hinsen wrote:
> On Mar 27, 2009, at 12:55, Konrad Hinsen wrote:
>
> > I'd say yes. Here's what happens: Typing "foo" at the REPL cau
On Mar 27, 2009, at 12:55, Konrad Hinsen wrote:
> I'd say yes. Here's what happens: Typing "foo" at the REPL causes a
> call to clojure.core/print-method. This is a multimethod that
> dispatches on the result of clojure.core/type, which is the value of
> the :type tag in the metadata if there is
On Mar 26, 2009, at 22:44, srader wrote:
> When I type the following in at the REPL:
>
> (def foo (ref {} :meta {:type :t}))
>
> and then try to print it, I get the following error:
>
> java.lang.ClassCastException: clojure.lang.Ref (NO_SOURCE_FILE:0)
> [Thrown class clojure.lang.Compiler$Compi
Hi,
When I type the following in at the REPL:
(def foo (ref {} :meta {:type :t}))
and then try to print it, I get the following error:
java.lang.ClassCastException: clojure.lang.Ref (NO_SOURCE_FILE:0)
[Thrown class clojure.lang.Compiler$CompilerException]
Is this a bug?
Thanks,
Scott
--~