Given the following models/relationship -
class Address
include MotionModel::Model
include MotionModel::ArrayModelAdapter
columns street: :string, city: :string
belongs_to :user
end
class User
include MotionModel::Model
include MotionModel::ArrayModelAdapter
columns name: :string
has_one :address
end
And this user hash:
{ "id"=>1, "name"=>"Steve", "address"=> { "id"=>1, "street"=>"2261 Market Street", "city"=>"San Francisco" } }
When I do the following User.new(user_hash).save the Address.count is still 0 ??
Given the following models/relationship -
And this user hash:
When I do the following
User.new(user_hash).savethe Address.count is still 0 ??