Great! ;)

2009/1/26 Tomasz Ignatiuk <[email protected]>

> It worked :)
>
>       $newAddress = $adress->copy();
>       $newAddress ->setUpdatedAt(time());
>
> Thank you very much :)
>
> 2009/1/26 Joel Cuevas <[email protected]>
>
> There must be a copy() method in your generated base classes, why don't you
>> take a look? It should work.
>>
>> I think that copy() doesn't copies the pks of the schema, but you will
>> have to update (or unset) manually the created_at and similar fields.
>>
>> HTH. :)
>>
>> 2009/1/26 Tomasz Ignatiuk <[email protected]>
>>
>>>
>>> Thank You Joel. It works fine and I think it is elegant solution :)
>>> One more question. How to copy object without ID field, but not
>>> cloneing it?
>>> I made sth like this :
>>>
>>> $newAddress = new Address();
>>> $newAddress ->setStreet($address->getStreet());
>>> ...
>>> and I set all fields. When I just copy object like this ($newAddress =
>>> $Address), it also copy its id, which cannot have value because ID is
>>> primary and autoincrement.
>>>
>>>
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to