The where clause improperly handles the state of nested properties
tywalch opened this issue · 0 comments
tywalch commented
Describe the bug
The where clause improperly handles the state of nested properties
ElectroDB Version
Specify the version of ElectroDB you are using
(e.g. 2.2.4
)
Entity/Service Definitions
Include your entity model (or a model that sufficiently recreates your issue) to help troubleshoot.
const tasks = new Entity(
{
model: {
entity: "tasks",
version: "1",
service: "taskapp"
},
attributes: {
team: {
type: "string",
required: true
},
task: {
type: "string",
required: true
},
project: {
type: "string",
required: true
},
example: {
type: 'map',
properties: {
from: {
type: 'number',
},
to: {
type: 'number',
},
},
}
},
indexes: {
projects: {
pk: {
field: "pk",
composite: ["team"]
},
sk: {
field: "sk",
// create composite keys for partial sort key queries
composite: ["project", "task"]
}
}
}
}
);
Expected behavior
Received:
"#example.#from <= :from0 AND (#example.#from.#to >= :to0 OR attribute_not_exists(#example.#from.#to))"
Expected:
"#example.#from <= :from0 AND (#example.#to >= :to0 OR attribute_not_exists(#example.#to))"