Closed benatspo closed 4 years ago
The syntax for inserting the date was wrong. It should have been:
insert CreditCard {id: 1, number: 1, expiryDate: $2021-12-31$}
However, there were bugs when mapping from the TyphonQL insertion query to the relational one, when there were dates involved. We thus fixed them on commit ebecb9bf8a7a9e4eb631231e9c99a30d1f5212dd . This works for relational databases, we have opened issue #33 to add support for dates in MongoDB.
Using TyphonQL eclipse plugin, I tried to insert a new entity instance, containing a Date attribute. According to the grammar, I used the following syntax for the insert query :
insert CreditCard {id: 1, number: 1, expiryDate: "2021-12-31"}
The insert was successful, and I'm able to find the added instance in the database, using an application connected to the database.But, when using TyphonQL editor to select the added instance, I have an exception. Query:
from CreditCard c select c
Exception:Here is the corresponding TML file, containg the definition of the entity and the Date type: