To answer my questions a bit later, after some work:

1) .get returns the first row by the key.  .first is chainable
like .all

--> The docs should be updated (http://datamapper.org/docs/find) to
explain this, as it mentions 'zoo' as the return to 'first'.

2) I still can't figure how to turn the irritating color codes off,
which don't work with Console.app

3) Hmm, I need to do more testing to try and see when it creates the
connections.

4) Lazy groups seem to be broken, I'll add a bug/example soon.  A
default lazy group (or option for it) would be nice.

The code is beautiful, nice work!  I encourage anyone with questions
to dig around in it.

I monkey patched a few methods into DataMapper::Model to make the
activerecord transition easier.

     def table_name(v) storage_names[:default] = v.to_s end

    #New AR-style scoping of queries
    def limit(z) all(:limit => z) end
    def order(z) all(:order => [z]) end
    def where(z) all(:conditions => z) end

Pretty slick!

Thanks,
Kevin

On Jun 22, 5:36 pm, Kevin Watt <[email protected]> wrote:
> Google groups has had a cookie bug for the last few days, so please delete 
> this if you got it already.
>
> 1) I figured .first would return an element, not an array.  I'm irritated 
> always having to call .first (ironic name) on it to get the element out.  Any 
> tips on how to hack this in?
>
> 2) Is there an equivalent  to ActiveRecord::Base.colorize_logging = false?
>
> 3) If I setup a secondary connection, will it be used right away?  I want to 
> have a connection to my backup server for a few random admin pages, but don't 
> want that server to have the connections for each rails process.  Any 
> suggestion?
>
> d=DataMapper.setup(:external, 'mysql://someother_host/dm_core_test'); 
> d.disconnect?
>
> Or should I put the setup code in my rarely-used controller action?
>
> 4) I'd like all my lazy values to be loaded at once by default, without 
> having to specify :lazy => [:mylazy] for each text field.  Any tips where to 
> hack in a default, or if this is easily possible?
>
> Thanks for a great product! :)
> -Kevin

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.

Reply via email to