Code Monkey home page Code Monkey logo

Comments (10)

andidev avatar andidev commented on July 17, 2024

PR jhipster/generator-jhipster#1796 solves this issue but it still needs to be implemented in jhipster-uml if a anyone wants to set a otherEntityField value other than id (this is possible for other relationships today, or am I wrong?)

from jhipster-uml.

MathieuAA avatar MathieuAA commented on July 17, 2024

@CarlKlagba did all the work needed because of #34.
I'll look into it a bit later today if there's still work to be done on that side.

from jhipster-uml.

CarlKlagba avatar CarlKlagba commented on July 17, 2024

This seems like only few changes. I will commit a fix when a can grab my laptop.

from jhipster-uml.

CarlKlagba avatar CarlKlagba commented on July 17, 2024

@andidev When generating an entity with a One-to-One not-owner relationship with java 7 there is this error:
[ERROR] /home/user/Documents/jhipsterproject/src/main/java/com/mycompany/myapp/web/rest/JobResource.java:[82,24] cannot find symbol
[ERROR] symbol: method getSecond()
[ERROR] location: variable job of type com.mycompany.myapp.domain.Job

This ligne correspond to this  one on the template _EntityResource.java.

I wonder what the "getSecond()" method is and how comes it hasn't been initialize.

from jhipster-uml.

andidev avatar andidev commented on July 17, 2024

Sorry, this is not good. I think that is my test data that leaked in to the code somehow probably cause of a copy paste action.

I'll fix it as soon as I can.

Thanks for noticing it.

from jhipster-uml.

andidev avatar andidev commented on July 17, 2024

Sorry I accidenty closed this. Fix for The bug should soon be merged. A bit sloppy cause Im bugfixing from my mobile lol

from jhipster-uml.

andidev avatar andidev commented on July 17, 2024

Fix for the jhipster bug is merged now with master branch

from jhipster-uml.

CarlKlagba avatar CarlKlagba commented on July 17, 2024

@andidev
Sorry for the late response, I hadn't much time during the week end.
I have still a few mistakes, and I would like you to help me find where it comes from.

I still have compilation errors with the generated app in all the _EntityResource.java files:
1)
[ERROR] symbol: variable HeaderUtil
[ERROR] location: class com.mycompany.myapp.web.rest.JobHistoryResource
[ERROR] /home/ippon/Documents/Applications/etudeUml/src/main/java/com/mycompany/myapp/web/rest/JobHistoryResource.java:[65,26] cannot find symbol

There is the import:
import com.mycompany.myapp.web.rest.util.HeaderUtil;
but not the java file.

[ERROR] symbol: class ArrayList
[ERROR] location: class com.mycompany.myapp.web.rest.DepartementResource
[ERROR] /home/ippon/Documents/Applications/etudeUml/src/main/java/com/mycompany/myapp/web/rest/DepartementResource.java:[118,44] cannot find symbol

The ArrayList import is not done for some Entity that still uses it.
The conditions to make the import are those one:
if (javaVersion == '7' && fieldsContainOneToOne == true && fieldsContainOwnerOneToOne == false) { %>
import java.util.ArrayList;<% } %>

I think that the problem comes from the fact that the faulty entity, Departement, has both an One-to-One ownerside and One-to-One not-ownerside relationships

[ERROR] symbol: variable filter
[ERROR] location: class com.mycompany.myapp.web.rest.EmployeeResource
[ERROR] /home/ippon/Documents/Applications/etudeUml/src/main/java/com/mycompany/myapp/web/rest/EmployeeResource.java:[79,34] cannot find symbol

the error seems to come from this line

All the errors are related to One-to-One relationships and/or Java7 . I hope you have time to take a look at those issues, I will keep looking and update you if needed.

from jhipster-uml.

andidev avatar andidev commented on July 17, 2024

No problem. I dont have mutch time myself and I can only fix bugs from my mobile currently. I'll fix the bug on wendsday at latest.

Looks like you are right according 2. It is actually the same reason why error 3 occurs. I need to introduce a new in memoryvariable fieldsContainOneToOneWithOwnerFalse to fix it.

Problem 1 can probably be solved by rerunnung The JHipster generator since the file HeaderUtils seems to be new (since 13 days back)

from jhipster-uml.

andidev avatar andidev commented on July 17, 2024

@CarlKlagba
Problem 2 and 3 should be fixed in jhipster/generator-jhipster#1813
I have tested this and it works now.

Problem 1 that you are having should be fixed by regenerating your jhipster app before running jhipster-uml as mentioned before. Hope it works this time.

from jhipster-uml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.