cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to get Supertype data by quering on Subtype attributes using flexible search query?

Former Member
0 Kudos
529

Hi Experts,

I have a requirement to get the data of a supertype by querying the fields of subtype attribute. For example :select * from {user} where {mobilenumber}='1234567890' where mobileNumber is field in customer type. Please suggest me how to achieve this ?

Thanks in advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Sivareddy,

You can achive this with:

 SELECT * 
 FROM  {user as u JOIN customer as c ON {u.uid} = {c.uid}} 
 WHERE {c.mobilenumber} = '1234567890'    

For more examples I suggest visiting: https://help.hybris.com/6.3.0/hcd/8bc33bb28669101481ccfb446695e9de.html

Best regards,

Filip