Need help with writing a basic n1ql query in java

29 views
Skip to first unread message

srao...@gmail.com

unread,
Sep 27, 2016, 7:03:17 PM9/27/16
to Couchbase
Hi,

I have just started learning couchbase. i am trying to write a basic query using java sdk but i am not able to understand how to write it.Below is the query.

 SELECT * 
        FROM users_with_orders usr 
                JOIN orders_with_users orders 
                    ON KEYS ARRAY s.order_id FOR s IN usr.shipped_order_history END


LetPath path=select("*,META(usr).id as _ID,META(usr).cas as _CAS).from(bucketName +" usr").join(bucketname +" orders").onKeys("usr.order_id) -----this is for joining without array

how should i proceed with the above query for on keys array.

Thanks!!!!


Gerald

unread,
Sep 28, 2016, 11:59:47 AM9/28/16
to Couchbase
Hi,

Can you post this on Couchbase N1QL forums or Stack Overflow, and we can help you there.
Reply all
Reply to author
Forward
0 new messages