I think this will create a new ID. What I'm looking for is:
- Retrieve base Price object
- Retrieve other (already existing) Price objects
- Set all properties from base object to all the others (except ID and
date_created)
- Save all objects, don't create new rows in DB
Of course I can just do $em->find("Price", 12) and set all properties
manually to the other objects but that isn't a nice solution with many
properties.
I'm a unsure if we understand each other right, maybe this will clear
things up?
Thanks for your time and effort by the way, I appreciate it.
Op woensdag 19 augustus 2015 18:00:51 UTC+2 schreef Parsifal:
>
> If this is not a simple "date" property or you need a complicated DQL to
> get $original as array and clone it this is fine. then:
>
> $clone = clone $somethig; // this is array and contains id?
> $price = $em->find("Price", $clone['id']);
> $price->someProperty = "foo";
> $price->persist();
> $price->flush();
>
--
You received this message because you are subscribed to the Google Groups
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.