Closed anothergoodguy closed 1 year ago
I am adding One more observation on the same generated app, please advise if it needs a separate issue I can open one more:
Issue Details:
in the same generated application with above mentioned configuration, UserRepository
is generated as ID
type Long
. even though the configuration has "pkType": "UUID",
.
the class declaration statement is generated as :
public interface UserRepository extends R2dbcRepository<User, Long>, UserRepositoryInternal {
It should have generated as:
public interface UserRepository extends R2dbcRepository<User, UUID>, UserRepositoryInternal {
This in-turn causes a compilation error in UserService
class's updateUser
method, due to the type mapping...
@anothergoodguy can you do a PR
@deepu105 I recently started to come back on to active development after many years. Even when I was a developer, I mostly worked on Java.
Not able to setup the dev env, on my mac, but I am not successful. I wanted to try learning it by creating my own simple blueprints, but not successful there either.
Can I test and report the issues till I get my self proficient on JHipster?
Thanks...
@anothergoodguy no worries all kinds of contributions including feedback and issue reports are appreciated 🙏
@dinu0000 can you take a look at this?
@dinu0000 can you take a look at this?
Yeah sure. Will look into this.
just realized that this issue report has two seperate issues and I started working on the UUID part. @anothergoodguy can you provide the .yo-rc.json
for the first issue regarding the DTO mapping?
I have attached both jhipster.info.result and .yo-rc.json
please let me know if you want me to publish the generated app to a temp git repo...
Bumping bounty since reactive templates are PITA and this will be a lot of testing work to get right
@dinu0000 approved
Overview of the issue
I am exploring Jhipster with spring-boot 3 of the main branch and generated a sample project with one of the JDL samples. After the generation with the project I see the service classes have mapping errors.
I know that main branch is under active development; however wanted to share my observation so that it can help the dev team.
findByCriteria methods in service classes are generated like the below example:
Motivation for or Use Case
It's a compilation error with type mapping
Reproduce the error
I tried re-generating and can see the issue is consistent
Suggest a Fix
The fix should be to map it before returning like:
return addressRepository.findByCriteria(criteria, pageable).map(addressMapper::toDto);
JHipster Version(s)
It's on the main branch, so I think it's 8.0.0 PreAlpha
JHipster configuration
Attaching the configuration from the result of
jhipster info
jhipster info result.txt