I was trying to create a copy of a ORM entity dynamically by looping over properties and then creating a memento that I then pass into the populate() method.
Since many getProperty() methods return NULL, the keys in the dynamic memento get defined but the values are "undefined" which the populate() method then fails on because it tries to populate the value from the key that has an undefined value.
So I believe there needs to be a check in there to make sure the structkey is valid before attempting to set it.
P.S. Having the ability to populate one entity from another of the same type would be a killer addition (with a deep copy flag too)
No file chosen
You have an empty file field. Please select or remove it.
Drop the files anywhere in this page to upload them as attachments.