The first time I used hibernate to automatically generate a table that involves foreign keys for multiple tables, I encountered several errors using the @ onetoworkflow and @ ManyToOne annotations.
First, declare a base. There is no need to correspond one-to-one annotations @ onetoworkflow and @ ManyToOne.
First question: What is the difference between @ onetoworkflow and @ ManyToOne?
When @ ManyToOne is used, such as the project manager class and the programmer class, a Project Manager manages multiple programmers,
That is, the field "mid" is generated in the t_programmer table corresponding to this Programmer ";
The @ onetoworkflow annotation is in
The field "mid" is generated in the t_programmer table. Multiple programmers correspond to one project manager.
It is worth mentioning that when @ onetoworkflow is used, Set <> j Set is required. Otherwise, an error is returned.
These are basic things. I forgot to take a look at them at any time.