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

Extract binding closures #19

Merged
merged 8 commits into from
Aug 20, 2018
Merged

Extract binding closures #19

merged 8 commits into from
Aug 20, 2018

Conversation

SpeedsterF2
Copy link
Collaborator

TypeStringManipulation
Property.getDefaultValue()
Dirty hack for enabling the usage of mongoDB Index2d

Eases reusing these closures for other template operations, e.g. createDelegateImpl.groovy!
Otherwise the closures are not visible in the sub-types of GeneratorBase!
If one type contains properties named lon and lat, reorder properties to have these two at the top.
For performing filtering on geo coordinates in Documents of the mongoDB (e.g. operation geoWithin), the Json
document containing the coordinates must have the longitude/X coordinate as first property and the latitude/Y
coordinate as second property (property names are irrelevant!).
But as JsonSlurper reorders the properties in alphabetic sequence, we can not force the necessary
longitude / latitude sequence by defining it in the model json.
Therefore this code tests for the existence of the properties lon and lat. If both are present,
then the properties are reordered so that lon and lat come first!
@OkieOth OkieOth merged commit a7043f9 into master Aug 20, 2018
@OkieOth OkieOth deleted the extract_binding_closures branch August 20, 2018 06:24
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

Successfully merging this pull request may close these issues.

2 participants