/*
- * Copyright (C) 2015 Roland Haeder
+ * Copyright (C) 2016 Roland Haeder
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
import java.util.Objects;
import javax.persistence.Basic;
+import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
* Parent category
*/
@JoinColumn (name = "parent_id")
- @OneToOne (targetEntity = ProductCategory.class)
+ @OneToOne (targetEntity = ProductCategory.class, cascade = CascadeType.MERGE)
private Category parentCategory;
/**