OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Programming Questions Export with QueryBuilder

This topic contains 6 replies, has 2 voices, and was last updated by  Mike Kudelya 5 years, 11 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #34263

    Geoffroy Cochard
    Participant

    Hi,

    I use OroImportExportBundle to export datas in a custom action like this :

    When JobInstance Entity would persist it throw a serialization error :

    Serialization of ‘Closure’ is not allowed

    Due things in key _em of QueryBuilder Object…

    Is the right to do ? Is another to way to use export bundle with complex query ?

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #34264

    Mike Kudelya
    Participant

    Hi,

    Probably doctrine is trying to serialize QueryBuilder to akeneo_batch_job_instance::rawConfiguration field and raise error. As workaround try to set for example [‘max_results’] => 1 to options in controller and process it in custom reader extended from here.

    #34265

    Geoffroy Cochard
    Participant

    Hi,

    Right, during createJobInstance(), it persist rawConfiguration property akeneo_batch_job_instance with who support options from ‘oro_importexport.handler.export service’.

    So for the moment we can’t pass query or a queryBuilder to ExportHandler options to use in EntityReader::setSourceQueryBuilder()

    max_results = 1 was an example, my needs would be more complex.

    Should i see process to use in datagrid export ?

    Geoffroy

    #34266

    Geoffroy Cochard
    Participant

    But i don’t see how to param/change Reader to ItemStep class use by oro_importexport.handler.export.

    Should i create a new connector to use another Reader ?
    Should i push a custom context in my processor definition ?

    Thanks a lot for your advices.

    #34267

    Mike Kudelya
    Participant

    Hi,

    How to override reader i have wrote there. Try to use custom options in controller like this and they automatically appear inside the reader.

    #34268

    Geoffroy Cochard
    Participant

    Hi,

    I’m going to try this solution.
    Thanks for all :) Great support.

    #34269

    Mike Kudelya
    Participant

    You are welcome!

Viewing 6 replies - 1 through 6 (of 6 total)

The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.

Back to top

You will be redirected to [title]. Would you like to continue?

Yes No

You will be redirected to [title]. Would you like to continue?

Yes No