datamappify icon indicating copy to clipboard operation
datamappify copied to clipboard

Timestamps

Open mattbeedle opened this issue 11 years ago • 1 comments

Right now once an entity is saved, you have to reload it to populate the timestamps:

user = User.new(name: 'test')
UserRepository.save(user)
user.created_at #=> nil
UserRepository.find(user.id).created_at #=> 2013-07-13 21:17:35 +0200

mattbeedle avatar Jul 13 '13 19:07 mattbeedle

Thanks! I just had a quick look and looks like we need a way to define attributes that should be force fetched upon returning an entity, as created_at and updated_at were not assigned. I'm marking this as a feature addition for now. :)

fredwu avatar Jul 23 '13 07:07 fredwu