#1040 ✓resolved
Nathan

update assumes non-loaded lazy properties are null if not already loaded

Reported by Nathan | September 13th, 2009 @ 09:47 PM

Calling update on a Resource where a key to update is a lazy loaded property not yet loaded, update returns false and doesn't update all the properties.


class Story
  include DataMapper::Resource
  property :id, Serial
  property :body, Text
end

s = Story.first
s.update({ "body"=>"something"}) # => false
s.original_attributes # => {#[DataMapper::Property @model=Story @name=:body]=]nil}

This applies to the next branch as of the date/time of this ticket.

(replaced angles with [] because lighthouse eats them as tags)

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Attachments

Pages