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

Failed to create entity using KHipster #40

Closed
groblochon opened this issue Aug 1, 2018 · 6 comments
Closed

Failed to create entity using KHipster #40

groblochon opened this issue Aug 1, 2018 · 6 comments

Comments

@groblochon
Copy link

Using JHipster v5.1.0 and latest jhipster-kotlin, on create entity with jdl or not, JHipster ask me to define a database.
kotlinEntityBug.txt

[x] Checking this box is mandatory (this is just to show you read everything)

@sendilkumarn
Copy link
Member

Entity generation PR is still not merged. So, it is not possible to generate entities at the moment.

Refer #37

@JavierFuentes
Copy link

@sendilkumarn,
what is the status of this...?

I've just executed then command $ jhipster --blueprint kotlin entity Todo without errors but all new Classes are .java files

My version is:

$ jhipster --version
5.8.2

@sendilkumarn
Copy link
Member

@JavierFuentes This should work even without the blueprint option.

jhipster entity Todo will suffice. (provided the project is created with blueprint option enabled)

@JavierFuentes
Copy link

Sorry @sendilkumarn,
but I've reverted all unversioned files in my VCS and repeat the entity creation without --blueprint modifier but the results are exactly the same... all server files are .java files

My version of Yeoman is this

$ yo --version
2.0.5

And my .yo-rc.json content is this:

{
    "generator-jhipster-kotlin": {
        "promptValues": {
            "packageName": "com.mycompany.myapp"
        },
        "jhipsterVersion": "5.7.2",
        "applicationType": "monolith",
        "baseName": "jhkPrueba",
        "packageName": "com.mycompany.myapp",
        "packageFolder": "com/mycompany/myapp",
        "serverPort": "8080",
        "authenticationType": "jwt",
        "cacheProvider": "ehcache",
        "enableHibernateCache": true,
        "websocket": "spring-websocket",
        "databaseType": "sql",
        "devDatabaseType": "mysql",
        "prodDatabaseType": "mysql",
        "searchEngine": false,
        "messageBroker": false,
        "serviceDiscoveryType": false,
        "buildTool": "maven",
        "enableSwaggerCodegen": true,
        "jwtSecretKey": "<the-secret>"
    },
    "generator-jhipster": {
        "jhipsterVersion": "5.8.2",
        "applicationType": "monolith",
        "baseName": "jhkPrueba",
        "clientFramework": "angularX",
        "useSass": true,
        "clientPackageManager": "npm",
        "testFrameworks": ["gatling", "protractor"],
        "jhiPrefix": "jhi",
        "entitySuffix": "",
        "dtoSuffix": "DTO",
        "otherModules": [
            {
                "name": "generator-jhipster-kotlin",
                "version": "0.7.0"
            }
        ],
        "enableTranslation": false,
        "blueprint": "generator-jhipster-kotlin",
        "blueprintVersion": "0.7.0"
    }
}

I only apreciate that jhipsterVersion doesn't match between generator-jhipster-kotlin and generator-jhipster entries but I don't know if this is the problem...

If I execute this inside my project's folder, this is the result:

$ jhipster --version
INFO! Using JHipster version installed locally in current project's node_modules
5.8.2

If I execute this outside my project's folder, the version is the same:

$ jhipster --version
INFO! Using JHipster version installed globally
5.8.2

I hope you can reproduce the scenario...

@JavierFuentes
Copy link

JavierFuentes commented Mar 21, 2019

Hi @sendilkumarn,
have you been able to reproduce the escenario?

Am I the only one that jhipster-kotlin generator blueprint generates entities in Java instead of Kotlin?

@pvliss
Copy link
Contributor

pvliss commented Mar 21, 2019

Hello @JavierFuentes. You are currently using Kotlin blueprint 0.7.0 which is the latest release but the entity generator PR(#74) was merged after that(see commit history). Currently the only way you can use the entity generator is by using the master branch. Sorry

We are working now to finish updating to JHipster 6.x(SB 2.1)(also still in development) and simultaneously reach full feature parity with the Java generator(see #98 )

@sendilkumarn Would it make sense to release a new version from current master so that the entity generator could be used?

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

No branches or pull requests

4 participants