-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use as export #5
Comments
rewrite: object_factory:
# type: default
# class: AppBundle\Entity\Client
type: jms_serializer
class: AppBundle\Entity\Client but jms_serializer not use accessor:
getter: getFuu |
Hi Avtonom, I dont know what you mean with the accessor/getter thing in your second example? Could you elaborate it a little more? Regards |
@mathielen thank you for quick response! |
Ok, I see. Well, the serializer is used to build the object from the underlying array. So there wont be any getter involved, only setters. See: https://github.com/mathielen/import-engine/blob/master/src/Mathielen/DataImport/Writer/ObjectWriter/JmsSerializerObjectFactory.php |
Tell me, please, as it to solve two problems:
public function getCard()
{
return $this->card->code();
}
/**
* @return \DateTime
*/
public function getDateCreated()
{
return $this->dateCreated;
}
/**
* @param \DateTime $dateCreated
*/
public function setDateCreated($dateCreated)
{
$this->dateCreated = $dateCreated;
} var_dump: ["dateCreated":protected]=> NULL
["card":protected]=> NULL |
problems 2 object_factory:
type: default to var_dump ["dateCreated":protected]=> NULL
["dateCreated"]=> object(DateTime)#614 (3) { but I can not get this value |
solved by commenting the line "object_factory". But we get the array instead of an object. |
now we have to get Entity->relation->Entity->name |
Dude, it seems like you just want to query doctrine and process the entities. You really should just use doctrine the old fashioned way :) |
Yes, I understand what you write. |
if use:
view:
The text was updated successfully, but these errors were encountered: