@ -1739,9 +1739,14 @@ Note that one can also define fields with aliases via the static factory method
@@ -1739,9 +1739,14 @@ Note that one can also define fields with aliases via the static factory method
====
[source,java]
----
project("name", "netPrice") // will generate {$project: {name: 1, netPrice: 1}}
project().and("foo").as("bar") // will generate {$project: {bar: $foo}}
project("a","b").and("foo").as("bar") // will generate {$project: {a: 1, b: 1, bar: $foo}}
// will generate {$project: {name: 1, netPrice: 1}}
project("name", "netPrice")
// will generate {$project: {bar: $foo}}
project().and("foo").as("bar")
// will generate {$project: {a: 1, b: 1, bar: $foo}}
project("a","b").and("foo").as("bar")
----
====
@ -1749,11 +1754,14 @@ project("a","b").and("foo").as("bar") // will generate {$project: {a: 1, b: 1, b
@@ -1749,11 +1754,14 @@ project("a","b").and("foo").as("bar") // will generate {$project: {a: 1, b: 1, b