4

Say I have a User entity with an embedded entity address which contains a house number property and a street property. How can I write a GQL projection query that will filter based on name and return a list of addresses ?

Sample Data: Sample Data

The projection query I am trying to write:

SELECT address FROM User WHERE name = Bob

This should return two addresses but it returns no results.

Thanks to anyone who answers !

Kookz
  • 239
  • 3
  • 12

1 Answers1

3

You can't project the entire entity value, but you can project the individual properties in the entity value, e.g.:

SELECT address.houseNumber FROM User WHERE name = Bob
Ed Davisson
  • 2,927
  • 11
  • 11