Roman Lototskyi
Roman Lototskyi

Reputation: 770

How to write flexibleSearch query in hybris HAC for one too many relation?

enter image description hereThis one doesn't work: SELECT *FROM {User as u JOIN Address as a ON {u:a} = {a:pk}} .

Upvotes: 0

Views: 2534

Answers (3)

Kitty
Kitty

Reputation: 1

Can try this:

 select * from {User as u JOIN Address as a on {u.pk}={a.owner}}

Upvotes: 0

Raushan Kumar
Raushan Kumar

Reputation: 1248

As you see in the relation cardinality is on the owner as User.

so query should be like this

SELECT *FROM {User as u JOIN Address as a ON {u:pk} = {a:owner}} 

Upvotes: 2

Roman Lototskyi
Roman Lototskyi

Reputation: 770

Missed that qualifier is "owner" , usually by convention it is named as a type . select {a.PK} from {customer as c join address as a on {c.pk}={a.owner}}

Upvotes: 0

Related Questions