Updated code for removing child entity from parent.
This commit is contained in:
@@ -536,8 +536,8 @@ public class Utils {
|
||||
|
||||
Field[] fields = entity.getClass().getDeclaredFields();
|
||||
for (Field field : fields) {
|
||||
if (field.getType().isAnnotationPresent(ManyToOne.class) || field.getType().isAnnotationPresent(OneToMany.class) || field.getType()
|
||||
.isAnnotationPresent(OneToOne.class) || field.getType().isAnnotationPresent(ManyToMany.class)) {
|
||||
if (field.isAnnotationPresent(ManyToOne.class) || field.isAnnotationPresent(OneToMany.class) || field
|
||||
.isAnnotationPresent(OneToOne.class) || field.isAnnotationPresent(ManyToMany.class)) {
|
||||
objectNode.remove(field.getName());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user