Debug creation

This commit is contained in:
Marc Ducobu 2014-10-08 17:29:52 +02:00
parent a0bacda530
commit f148c7e566

View File

@ -48,7 +48,13 @@ class JsonCustomFieldToArrayTransformer implements DataTransformerInterface {
public function transform($customFieldsJSON) public function transform($customFieldsJSON)
{ {
echo $customFieldsJSON; echo $customFieldsJSON;
if($customFieldsJSON === null) { // lors de la creation
$customFieldsArray = array();
} else {
$customFieldsArray = json_decode($customFieldsJSON,true); $customFieldsArray = json_decode($customFieldsJSON,true);
}
/* /*
echo "<br> - 4 - <br>"; echo "<br> - 4 - <br>";
@ -115,6 +121,9 @@ class JsonCustomFieldToArrayTransformer implements DataTransformerInterface {
//$entityClass = substr($type, 10, -1); //$entityClass = substr($type, 10, -1);
//echo $entityClasss; //echo $entityClasss;
if(strpos($type, 'ManyToOnePersist') === 0) { if(strpos($type, 'ManyToOnePersist') === 0) {
// PEUT ETRE A FAIRE SI SEULEMENT $value->getId() ne renvoie rien...
//
//
$this->om->persist($value); // pas bon ici $this->om->persist($value); // pas bon ici
// LE PERSIST NE SERT QUE LA PREMIERE FOIS // LE PERSIST NE SERT QUE LA PREMIERE FOIS
// plutot le mettre dans une var temporaire de adress // plutot le mettre dans une var temporaire de adress