Welcome Guest, Not a member yet? Register   Sign In
Insert or Update in Save() method of Datamapper
#8

[eluser]alaminx[/eluser]
I did that way , but the country_id in city is not update. Its value is NULL.
Code:
$country=new country($country_id);
if ( $country->exists() )
{
    $city = new city();
    $city->name = 'cityname';
    $city->save();
    $country->save($city);
}


Messages In This Thread
Insert or Update in Save() method of Datamapper - by El Forum - 10-14-2010, 09:04 AM
Insert or Update in Save() method of Datamapper - by El Forum - 10-14-2010, 10:29 AM
Insert or Update in Save() method of Datamapper - by El Forum - 10-14-2010, 10:42 AM
Insert or Update in Save() method of Datamapper - by El Forum - 10-14-2010, 11:20 AM
Insert or Update in Save() method of Datamapper - by El Forum - 10-14-2010, 12:06 PM
Insert or Update in Save() method of Datamapper - by El Forum - 10-14-2010, 12:11 PM
Insert or Update in Save() method of Datamapper - by El Forum - 10-14-2010, 12:28 PM
Insert or Update in Save() method of Datamapper - by El Forum - 10-14-2010, 12:36 PM
Insert or Update in Save() method of Datamapper - by El Forum - 10-14-2010, 12:40 PM



Theme © iAndrew 2016 - Forum software by © MyBB