Ya that would solve it.

nice catch


On Wed, Apr 2, 2014 at 10:57 AM, jouh <notifications@github.com> wrote:

> In src/model/model.coffee:
>
> > +
> > +    hasManys = @reflectOnAllAssociations('hasMany')?.filter((association) -> association.options.includeInTransaction)
> > +    hasManyLabels = hasManys?.mapToProperty('label') || []
> > +    for label in hasManyLabels
> > +      @get(label) # load empty association sets
> > +
> > +    attributes = @get('attributes').toObject()
> > +    for own key, value of attributes
> > +      if value instanceof Batman.Model && !value.isTransaction
> > +        attributes[key] = value._transaction(visited, stack)
> > +
> > +      else if value instanceof Batman.AssociationSet && !value.isTransaction
> > +        newValues = new Batman.TransactionAssociationSet(value, visited, stack)
> > +        attributes[key] = newValues
> > +
> > +      else if typeof value is 'object'
>
> I just tried the updated code and this line seems to cause problems with
> dates. Maybe use Batman.typeOf instead?
>
>   typeof New Date # "object"
>   Batman.typeOf(new Date) # "Date"
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/batmanjs/batman/pull/992/files#r11209024>
> .
>