OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform EntitySerializedFieldsBundle: How to query a serialized field?

This topic contains 2 replies, has 2 voices, and was last updated by  Frank 4 years, 8 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
  • #40121

    Frank
    Participant

    Hi Oro-team,

    is there a sustainable solution to query for a custom field of an entity, which was created using Oro’s EntitySerializedFieldsBundle?

    I want to query for buOwner-property using the ShoppingListQueryBuilder():

    This could not work, of course.
    – buOwner is a custom ShoppingList-entity-property, but I cannot query for it directly
    – buOwner is a attribute of database field serialized_data

    I can retrieve the serialized_data-string using myql-decoding like
    – SELECT convert(FROM_BASE64(serialized_data) using UTF8)
    and build a custom hardcoded query with it …

    However, I want to use on board tools.
    Is there an easy way to adapt function findAvailableForCustomerUser() in such a manner,
    that it is queriing buOwner-property correctly?

    Thanks a lot for help!

    Kind regrads
    Frank

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #40122

    Andrey Yatsenko
    Moderator

    This is the main limitations of the serialized fields. No real columns at the database, and as a result no sorting and filtering per this field.

    #40123

    Frank
    Participant

    Hi Andrey,

    thanks for your urgent reply!!!

    Hm. Makes me sad, a little bit. ;-( So, I have to build a custom query. Hope, this will not cost so much performance.

    Kind regards
    Frank.

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

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

Back to top