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

[CS] Naming collision if field has same name as table and used as key #7842

Merged
merged 34 commits into from
Mar 3, 2023

Conversation

tira-misu
Copy link
Contributor

In one of my schema a field has same name as table. This causes non compiling .Net code because the field is generated with an "_" to prevent collisions. This PR fixes this issue.

A test case is also included.

tira-misu and others added 30 commits October 1, 2019 07:51
Pull from google/flatbuffers
If a struct has a key the vector has to be sorted. To sort the vector
you can't use "const".
* option indent_step is supported
@github-actions github-actions bot added c# c++ codegen Involving generating code from schema labels Mar 1, 2023
@dbaileychess dbaileychess merged commit d1e4daa into google:master Mar 3, 2023
dbaileychess added a commit that referenced this pull request Mar 15, 2023
…#7842)

* Fix C/C++ Create<Type>Direct with sorted vectors

If a struct has a key the vector has to be sorted. To sort the vector
you can't use "const".

* Changes due to code review

* Improve code readability

* Add generate of JSON schema to string to lib

* option indent_step is supported

* Remove unused variables

* Fix break in test

* Fix style to be consistent with rest of the code

* [TS] Fix reserved words as arguments (#6955)

* [TS] Fix generation of reserved words in object api (#7106)

* [TS] Fix generation of object api

* [TS] Fix MakeCamel -> ConvertCase

* [C#] Fix collision of field name and type name

* [TS] Add test for struct of struct of struct

* Update generated files

* Add missing files

* [TS] Fix query of null/undefined fields in object api

* Fix collision if field name is equal to table name and used as key in an array

---------

Co-authored-by: Derek Bailey <derekbailey@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c# c++ codegen Involving generating code from schema
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants