Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
348 views
in Technique[技术] by (71.8m points)

java - How to generate @OneToOne and @ManyToMany JPA relations in Telosys using Dsl Model

Im trying to generate classes using my own springboot template and Dsl models. In my ".entity" files I have:

Car {?????
id : int {????? @Id, @AutoIncremented }?????;
users : Employee [];
}?????
    
Employee {?????
id : long {????? @Id }????? ;
name : string ;
cars : Car[] ;
}?????

I was expecting a @ManyToMany relation in JPA but I didn't. The same thing with this:

Car {?????
id : int {????? @Id, @AutoIncremented }?????;
user : Employee;
}?????
    
Employee {?????
id : long {????? @Id }????? ;
name : string ;
car : Car;
}?????

I expect a @OneToOne relation but I don't get it. It seems I can only get @ManyToOne and @OneToMany. How can I get @ManyToMany and @OneToOne relations using DSL models?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...