How to put condition in hibernate -
I have two squares. College and Students, as the bottom
class college {int id; @OneToMany (fetch = FetchType.EAGER, cascade = {CascadeType.ALL}) @ FET (value = FetchMode.SELECT) @Join column (name = "id") list & lt; Students & gt; STD; Public zero is eligible () {// some code here}} I continue these two items for this tables. I now want to continue in the student table only then, If that qualified returns are correct How can I keep that situation? Can I use filters? First of all, your mapping may seem a little bit for me, it should look something like this:
class college {// ... @OneToMany (mapped = "college") list & lt; Students & gt; Students; // ...} class student {// ... @ManyToOne (columnName = "college_id", ...) college college; Second, about the conditional firmness of the students, that your persistence layer (or trade logic level, if you have it) should be treated, not your model layer (the definition of your base organizations).
Comments
Post a Comment