Closed MInesGomes closed 5 years ago
I have this Jdl
entity NmsAlert { alertBegin ZonedDateTime, alertSent ZonedDateTime, alertAnswered ZonedDateTime, text String } relationship ManyToOne { NmsAlert{userAttended} to User, }
And It generates import { User } from '../../../services/user/user.model'; That doesn't exist
import { User } from '../../../services/user/user.model';
============ I replaced with import { JhiUser } from '../../../../model/jhi-user';
import { JhiUser } from '../../../../model/jhi-user';
and created this class in src/model
export class JhiUser { constructor( public id?: number, public login?: string, public activated?: boolean, public authorities?: any[], public email?: string, public firstName?: string, public langKey?: string, public lastName?: string, public imageUrl?: string, public createdBy?: string, public createdDate?: Date, public lastModifiedBy?: string, public lastModifiedDate?: Date, public password?: string ) { this.id = id ? id : null; this.login = login ? login : null; this.firstName = firstName ? firstName : null; this.lastName = lastName ? lastName : null; this.email = email ? email : null; this.activated = activated ? activated : false; this.langKey = langKey ? langKey : 'en'; this.authorities = authorities ? authorities : null; this.createdBy = createdBy ? createdBy : null; this.createdDate = createdDate ? createdDate : null; this.lastModifiedBy = lastModifiedBy ? lastModifiedBy : null; this.lastModifiedDate = lastModifiedDate ? lastModifiedDate : null; this.password = password ? password : null; } }
=====
And is working :-)
I imported this JDL with the new import-jdl subgenerator and ran ionic build --prod and everything compiles. Because of this, I'm closing this issue as fixed.
import-jdl
ionic build --prod
I have this Jdl
And It generates
import { User } from '../../../services/user/user.model';
That doesn't exist============ I replaced with
import { JhiUser } from '../../../../model/jhi-user';
and created this class in src/model
=====
And is working :-)