jaxio / celerio-angular-quickstart

Generate an Angular 5 CRUD application from an existing database schema (we provide a sample one)
Apache License 2.0
479 stars 138 forks source link

Bug in Template EntityDTOService.java.e.vm #9

Closed vivienmast closed 7 years ago

vivienmast commented 7 years ago

There appears to be a bug in the Template EntityDTOService.java.e.vm, in line 192:

The variable declaration final int fdepth = depth; is within a for-loop: #foreach ($relation in $entity.manyToMany.list) This leads to the same variable being declared multiple times if several relations exist, causing a compile error.

Taking the declaration out of the loop solved the issue for me (though it would be prettier to surround it with an if-statement)

nromanetti commented 7 years ago

Good catch, thank you Vivien :) Next time do not hesitate to create a pull request.

vivienmast commented 7 years ago

I was in the middle of something else when this came up, so I just dumped it here so that it wouldn't be forgotten. Next time I'll do it via pull request.