Skip to content
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

manytoone and other relations #3

Open
mssoylu opened this issue Sep 16, 2017 · 3 comments
Open

manytoone and other relations #3

mssoylu opened this issue Sep 16, 2017 · 3 comments

Comments

@mssoylu
Copy link

mssoylu commented Sep 16, 2017

how can I download related entities as fixture ?

@DavidGarciaCat
Copy link

I have the same problem, I can't export mapped entities

@DavidGarciaCat
Copy link

Digging a little, looks like the Annotations Reader is not working properly, or at least the command is unable to process the request.

Example:

https://github.com/jupeter/DoctrineDumpFixturesBundle/blob/master/Command/DoctrineDumpCommand.php#L137

If we dump the content of $fields we get an array of the properties we want to export, like this:

array:3 [
  "name" => []
  "description" => []
  "image" => array:1 [
    "targetEntity" => "Image"
  ]
]

However if we dump the content of $fieldName and $attributes then we get this:

"name"
[]
"description"
[]
"image"
[]

So $attributes is unable to return the targetEntity and because of this we get the

  [Exception]
  aaa

That I reported here: #4

@DavidGarciaCat
Copy link

@mehmetsoylucom looks like you need to add the Dump\Entity and Dump\Column annotations on both entities, the one that is mapping and the one that is mapped, even if the doctrine annotation is not for a bi-directional mapping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants