Closed nathanael540 closed 2 weeks ago
Thanks for reporting! I'm surprised this is allowed, especially as you have shown it conflicts with the template dollar-sign syntax.
I can't really find any official guidance on allowed characters for variable names (except _
for private visibility), do you know any? A Stack Overflow answer hints that the dollar-sign is reserved for generated code. Still, the generator should maybe support this.
So, im using objectbox with appwrite, and in appwrite the document ID are with $ on begin.
But, I create one new model with docId to avoid conflicts.
Is there an existing issue?
Build info
Steps to reproduce
just create an entity with a $ at the beginning of one of its properties:
Expected behavior
Generated objectbox.g.dart file with correct escaping like
Actual behavior
Generated code does not have character escaping:
Code
Logs, stack traces
VSCode show the message on file: Undefined name 'id'. Try correcting the name to one that is defined, or defining the name.