jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.53k stars 4.02k forks source link

ERROR! An error occured while running jhipster:bootstrap-application#checkProperties ERROR! ERROR! You have duplicate properties in entity Elemento: proyecto Error: You have duplicate properties in entity Elemento: proyecto at BootstrapApplicationGenerator.checkProperties #27386

Closed yeferdiplomado closed 4 weeks ago

yeferdiplomado commented 4 weeks ago

JDL

entity Proyecto { nombre String required, descripcion String }

entity Elemento { titulo String required, texto String }

// Relación relationship ManyToOne { Elemento{proyecto} to Proyecto }

relationship OneToMany { Proyecto{elementos} to Elemento }

entity Imagen { url String required }

relationship OneToMany { Elemento{imagenes} to Imagen }

// DTOs y servicios dto Proyecto, Elemento, Imagen with mapstruct service Proyecto, Elemento, Imagen with serviceClass

// Paginación paginate Proyecto, Elemento, Imagen with pagination

jhipster 8.7.0 vue 3 jdk java 21 postgresql maven

yeferdiplomado commented 4 weeks ago

@mshima with jhipster + vue + java + postgresql and maven you can create a jdl of a functionality where you can add elements to a project and in those elements you can put both images and text and it is saved in a file system since the weight of the Images cannot be saved in the database because it would explode if not only saving the urls of the image and the images being saved in the file system, the images must be linked to the project element so that if you save it later you can see it in the element where it was created

I must create the basic jdl and then implement the file system for the images but I cannot run the jdl

mshima commented 4 weeks ago

It's working as expected. Elemento.proyecto is been added by ManyToOne relationship

relationship ManyToOne {
Elemento{proyecto} to Proyecto
}

and by OneToMany as back-reference.

relationship OneToMany {
Proyecto{elementos} to Elemento
}

You should rename one:

relationship OneToMany {
Proyecto{elementos} to Elemento{anotherProyecto}
}
mshima commented 4 weeks ago

I suppose this is answered. Closing.