Skip to Content
author's profile photo Former Member
Former Member

How can I put an enum value in a flexiblesearch query?

I want to be able to put a an enum value in query. The enum type is referrenced from BidStatus so in the table I am referencing it from its a pk key. but I only have access to the string value. How does it work when dealing with enum types in flexible search query?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jul 24, 2014 at 11:08 AM

    Join to enumerationvalue table e.g.

    select {o.code},{status.code}  
    from {order as o join enumerationvalue as status on {o.status}={}}  
    where {status.code}='COMPLETED'

    or I can be more specific since I know the type of enum

    select {o.code},{status.code}  
    from {order as o join orderstatus as status on {o.status}={}}
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 22, 2014 at 09:32 PM

    we are not required to use flexiblesearchservice for getting enumerations. The enumeration service provides various methods for accesing the enumerationtypes in hybris. Please have a look at this service to get more details on this.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.