OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums OroPlatform EntitySerializedFieldsBundle: How to query a serialized field?

This topic contains 2 replies, has 2 voices, and was last updated by  Frank 2 weeks, 5 days ago.

  • 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
    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)

You must be logged in to reply to this topic.

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

Yes No