Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

newData as value instead of object #13

Closed
benthehenten opened this issue Aug 29, 2015 · 5 comments
Closed

newData as value instead of object #13

benthehenten opened this issue Aug 29, 2015 · 5 comments

Comments

@benthehenten
Copy link

It appears that Targaryen evaluates newData as the value to be written, instead of an object with {key:value} of the data to be written (as Firebase does).

For example, if I have the collection:

/users/$uid
   - first_name
   - last_name
   - age

and I try to write "Ben" to /users/USER123/first_name and do the check: newData.val().length > 0, Targaryen will evaulate newData as "ben", while in Firebase, it will evaluate newData as {'first_name': "Ben"}, so to do the constraint, I actually need to write: newData.first_name.val().length > 0.

@goldibex
Copy link
Owner

Yeah, it turns out I erred in my interpretation of the behavior of the canonical rule parser. This is the same problem as #9.

@goldibex
Copy link
Owner

Working the problem now.

@benthehenten
Copy link
Author

Thanks! Targaryen has been super useful--thanks for the awesome tool.

@goldibex
Copy link
Owner

goldibex commented May 4, 2016

@benthehenten can you take a look at this again with Targaryen 2.1.0 and see if the problem persists? I think it was corrected with #27, but I want to be sure.

@goldibex
Copy link
Owner

Closed by #27.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants