ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

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

  • Creator
    Topic
  • #23015

    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
  • #23022
    Mike Kudelya
    Mike Kudelya
    Oro Core

    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.

    #23036

    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

    #23038

    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.

    #23068
    Mike Kudelya
    Mike Kudelya
    Oro Core

    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.

    #23081

    Geoffroy Cochard
    Participant

    Hi,

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

    #23084
    Mike Kudelya
    Mike Kudelya
    Oro Core

    You are welcome!

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

You must be logged in to reply to this topic.