Löschen von Datensätzen mit kindern

Ich habe zwei Entities

@Entity
@Table(catalog = "address", schema = "")
@XmlRootElement
@NamedQueries({
/*    
    @NamedQuery(name = "Country.findAll", query = "SELECT c FROM Country c"),
    @NamedQuery(name = "Country.findById", query = "SELECT c FROM Country c WHERE c.id = :id"),
    @NamedQuery(name = "Country.findByCreatedAt", query = "SELECT c FROM Country c WHERE c.createdAt = :createdAt"),
    @NamedQuery(name = "Country.findByModifiedAt", query = "SELECT c FROM Country c WHERE c.modifiedAt = :modifiedAt"),
    @NamedQuery(name = "Country.findByDeletedAt", query = "SELECT c FROM Country c WHERE c.deletedAt = :deletedAt"),
    @NamedQuery(name = "Country.findByPublished", query = "SELECT c FROM Country c WHERE c.published = :published"),
    @NamedQuery(name = "Country.findByIso3166", query = "SELECT c FROM Country c WHERE c.iso3166 = :iso3166"),
    @NamedQuery(name = "Country.findByIso", query = "SELECT c FROM Country c WHERE c.iso = :iso"),
    @NamedQuery(name = "Country.findByCurrencyId", query = "SELECT c FROM Country c WHERE c.currencyId = :currencyId"),
    @NamedQuery(name = "Country.findByRegionId", query = "SELECT c FROM Country c WHERE c.regionId = :regionId"),
    @NamedQuery(name = "Country.findByPostCodeRequest", query = "SELECT c FROM Country c WHERE c.postCodeRequest = :postCodeRequest")
*/
})
public class Country implements IMaintainceEntity<Integer>, IDeletableEntity<Integer>, IPublishabledEntity<Integer> {
        private static final long serialVersionUID = 1L;
        
        /**
         * the primary key
         * 
         * @var     INTEGER(11)
         */
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        @Basic(optional = false)
        @Column(nullable = false)
        private Integer id;
        
        /**
         * the creation date
         * 
         * @var     TIMESTAMP
         */        
        @Basic(optional = false)
        @NotNull
        @Column(name = "created_at", nullable = false)
        @Temporal(TemporalType.TIMESTAMP)
        private Date createdAt;
        
        /**
         * who has created this country
         * 
         * @var     INTEGER(11)
         */
        @JoinColumn(name = "created_by", referencedColumnName = "id")
        @ManyToOne(fetch = FetchType.LAZY)
        private Person createdBy;
        
        /**
         * the date of the last modification
         * 
         * @var     TIMESTAMP
         */        
        @Column(name = "modified_at")
        @Temporal(TemporalType.TIMESTAMP)
        private Date modifiedAt;
        
        /**
         * who has the country modified at least
         * 
         * @var     INTEGER(11)
         */        
        @JoinColumn(name = "modified_by", referencedColumnName = "id")
        @ManyToOne(fetch = FetchType.LAZY)
        private Person modifiedBy;
        
        /**
         * the date, when this country was set as deleted
         * 
         * @var     TIMESTAMP
         */        
        @Column(name = "deleted_at")
        @Temporal(TemporalType.TIMESTAMP)
        private Date deletedAt;
        
        /**
         * how has set this country as deleted
         * 
         * @var     INTEGER
         */
        @JoinColumn(name = "deleted_by", referencedColumnName = "id")
        @ManyToOne(fetch = FetchType.LAZY)
        private Person deletedBy;
        
        /**
         * if the country published
         * 
         * @var     TINYINT(1)
         */        
        @Basic(optional = false)
        @NotNull
        @Column(nullable = false)
        private boolean published;
                
        /**
         * the 2 char long iso 3166 code for this country
         * e.g.
         * gb = united kingdom
         * de = germany
         * us = united staates
         * 
         * @var     VARCHAR(10)
         */        
        @Basic(optional = false)
        @NotNull
        @Size(min = 1, max = 10)
        @Column(nullable = false, length = 10)
        private String iso2;
        
        /**
         * the 3 char long iso 3166 code for this country
         * 
         * gbr = united kingdom
         * deu = germany
         * usa = united staates
         * 
         * @var     VARCHAR(10)
         */        
        @Basic(optional = false)
        @NotNull
        @Size(min = 1, max = 10)
        @Column(nullable = false, length = 10)
        private String iso3;
        
        /**
         * the numerical iso code for this country
         * 
         * gbr = united kingdom
         * deu = germany
         * usa = united staates
         * 
         * @var     VARCHAR(10)
         */        
        @Basic(optional = false)
        @NotNull
        @Size(min = 1, max = 10)
        @Column(nullable = false, length = 10)
        private String numiso;
        
        /**
         * the currency of this country
         * 
         * @var     INTEGER
         */        
        @JoinColumn(name = "currency_id", referencedColumnName = "id")
        @ManyToOne(fetch = FetchType.LAZY)
        private Currency currency;
        
        /**
         * the associated region
         * 
         * @var     INTEGER
         */        
        @JoinColumn(name = "region_id", referencedColumnName = "id")
        @ManyToOne(fetch = FetchType.LAZY)
        private Region region;
        
        /**
         * is the postal code needed for for the address format?
         * 
         * @var     TINYINT(1)
         */        
        @Basic(optional = false)
        @NotNull
        @Column(name = "post_code_request", nullable = false)
        private boolean postCodeRequest;
        
        /**
         * the specified address format for this country
         * 
         * @var     TEXT
         */                
        @Lob
        @Size(max = 16777215)
        @Column(name = "address_format", length = 16777215)
        private String addressFormat;
 
        /**
         * this are the names of the country
         */
        @OneToMany(cascade = CascadeType.ALL, mappedBy = "country", fetch = FetchType.LAZY)
        private List<CountryName> names;

        /**
         * the staates of the country
         */
        @OneToMany(cascade = CascadeType.ALL, mappedBy = "country", fetch = FetchType.LAZY)
        private List<Staate> staateList;

        /**
         * the address who use this contry
         */
        @OneToMany(cascade = CascadeType.ALL, mappedBy = "country", fetch = FetchType.LAZY)
        private List<Address> addressList;

        /**
         * default constructor
         */
        public Country() {
        }

        //=== GETTER / SETTER
        @Override
        public Integer getId() {
            return id;
        }

        @Override
        public void setId(Integer id) {
            this.id = id;
        }

        @Override
        public Date getCreatedAt() {
            return createdAt;
        }

        @Override
        public void setCreatedAt(Date createdAt) {
            this.createdAt = createdAt;
        }
        
        @Override
        public Person getCreatedBy() {
            return createdBy;
        }

        @Override
        public void setCreatedBy(Person createdBy) {
            this.createdBy = createdBy;
        }

        @Override
        public Date getModifiedAt() {
            return modifiedAt;
        }

        @Override
        public void setModifiedAt(Date modifiedAt) {
            this.modifiedAt = modifiedAt;
        }
        
        @Override
        public Person getModifiedBy() {
            return modifiedBy;
        }

        @Override
        public void setModifiedBy(Person modifiedBy) {
            this.modifiedBy = modifiedBy;
        }

        @Override
        public Date getDeletedAt() {
            return deletedAt;
        }

        @Override
        public void setDeletedAt(Date deletedAt) {
            this.deletedAt = deletedAt;
        }
        
        @Override
        public Person getDeletedBy() {
            return deletedBy;
        }

        @Override
        public void setDeletedBy(Person deletedBy) {
            this.deletedBy = deletedBy;
        }

        @Override
        public boolean getPublished() {
            return published;
        }

        @Override
        public void setPublished(boolean published) {
            this.published = published;
        }
        
        public String getIso2() {
            return iso2;
        }

        public void setIso2(String iso2) {
            this.iso2 = iso2;
        }
        
        public String getIso3() {
            return iso3;
        }

        public void setIso3(String iso3) {
            this.iso3 = iso3;
        }

        public String getNumIso() {
            return numiso;
        }

        public void setNumIso(String numiso) {
            this.numiso = numiso;
        }


        public Currency getCurrency() {
            return currency;
        }

        public void setCurrencyId(Currency currency) {
            this.currency = currency;
        }

        public Region getRegion() {
            return region;
        }

        public void setRegion(Region region) {
            this.region = region;
        }

        public boolean getPostCodeRequest() {
            return postCodeRequest;
        }

        public void setPostCodeRequest(boolean postCodeRequest) {
            this.postCodeRequest = postCodeRequest;
        }

        public String getAddressFormat() {
            return addressFormat;
        }

        public void setAddressFormat(String addressFormat) {
            this.addressFormat = addressFormat;
        }

        @XmlTransient
        public List<CountryName> getNames() {
            return names;
        }

        public void setNames(List<CountryName> names) {
            this.names = names;
        }
        
        @XmlTransient
        public List<Staate> getStaateList() {
            return staateList;
        }

        public void setStaateList(List<Staate> staateList) {
            this.staateList = staateList;
        }

        @XmlTransient
        public List<Address> getAddressList() {
            return addressList;
        }

        public void setAddressList(List<Address> addressList) {
            this.addressList = addressList;
        }

        @Override
        public int hashCode() {
            int hash = 0;
            hash += (id != null ? id.hashCode() : 0);
            return hash;
        }

        @Override
        public boolean equals(Object object) {
            // TODO: Warning - this method won't work in the case the id fields are not set
            if (!(object instanceof Country)) {
                return false;
            }
            Country other = (Country) object;
            if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
                return false;
            }
            return true;
        }

        @Override
        public String toString() {
           return "Country{" + "id=" + id + ", createdAt=" + createdAt + ", createdBy=" + createdBy + ", modifiedAt=" + modifiedAt + ", modifiedBy=" + modifiedBy + ", deletedAt=" + deletedAt + ", deletedBy=" + deletedBy + ", published=" + published + ", iso2=" + iso2 + ", iso3=" + iso3 + ", numiso=" + numiso + ", currency=" + currency + ", region=" + region + ", postCodeRequest=" + postCodeRequest + ", addressFormat=" + addressFormat + ", names=" + names + ", staateList=" + staateList + ", addressList=" + addressList + "}";
        }


}

und

@Entity
@Table(name = "country_name", catalog = "address", schema = "")
@XmlRootElement
@NamedQueries({
/*    
    @NamedQuery(name = "CountryName.findAll", query = "SELECT c FROM CountryName c"),
    @NamedQuery(name = "CountryName.findById", query = "SELECT c FROM CountryName c WHERE c.id = :id"),
    @NamedQuery(name = "CountryName.findByName", query = "SELECT c FROM CountryName c WHERE c.name = :name") 
*/
})
public class CountryName implements IEntity<Integer> {
        private static final long serialVersionUID = 1L;
        
        /**
         * the primary key
         * 
         * @var     INTEGER(11)
         */
        @Id
        @GeneratedValue(strategy = GenerationType.IDENTITY)
        @Basic(optional = false)
        @Column(nullable = false)
        private Integer id;

        /**
         * the associated country
         * 
         * @var     INTEGER(11)
         */
        @JoinColumn(name = "country_id", referencedColumnName = "id", nullable = false)
        @ManyToOne(optional = false, fetch = FetchType.LAZY)
        private Country country;
        
        /**
         * the associated language
         * 
         * @var     INTEGER(11)
         */
        @JoinColumn(name = "language_id", referencedColumnName = "id", nullable = false)
        @ManyToOne(optional = false, fetch = FetchType.LAZY)
        private Language language;
        
        /**
         * the name of the country
         * 
         * @var     INTEGER(11)
         */
        @Basic(optional = false)
        @NotNull
        @Size(min = 1, max = 255)
        @Column(nullable = false, length = 255)
        private String name;
        
        /**
         * default constructor
         */
        public CountryName() {
        }


        //=== GETTER / SETTER
        @Override
        public Integer getId() {
            return id;
        }

        @Override
        public void setId(Integer id) {
            this.id = id;
        }
        
        public Country getCountry() {
            return country;
        }

        public void setCountry(Country country) {
            this.country = country;
        }
        
        public Language getLanguage() {
            return language;
        }

        public void setLanguage(Language language) {
            this.language = language;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        @Override
        public int hashCode() {
            int hash = 0;
            hash += (id != null ? id.hashCode() : 0);
            return hash;
        }

        @Override
        public boolean equals(Object object) {
            // TODO: Warning - this method won't work in the case the id fields are not set
            if (!(object instanceof CountryName)) {
                return false;
            }
            CountryName other = (CountryName) object;
            if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
                return false;
            }
            return true;
        }

        @Override
        public String toString() {
            return "CountryName{" + "id=" + id + ", country=" + country + ", language=" + language + ", name=" + name + '}';
        }    
}

Ich habe dazu eine Test - Funktion für insert geschrieben

        /**
         * test insert method of calss CountryDAO
         */     
        @Test
        public void testInsert() {
            System.out.println("test insert method of class CountryDAO");

            boolean thrown = false;
            Country country = new Country();
            country.setIso2("de");
            country.setIso3("deu");
            country.setNumIso("276");

            // set names
            Language language_de = new Language(1);
            Language language_en = new Language(2);
            
            CountryName name1 = new CountryName();
            name1.setCountry(country);
            name1.setLanguage(language_de);
            name1.setName("Deutschland");

            CountryName name2 = new CountryName();
            name2.setCountry(country);
            name2.setLanguage(language_en);
            name2.setName("Germany");

            List<CountryName> list = new ArrayList<CountryName>();
            list.add(name1);
            list.add(name2);
            country.setNames(list);
            
            try {
                dao.beginTransaction();
                dao.insert(country);
                dao.commit();
            } catch ( Exception e ) {
                System.out.println(e);
                dao.rollback();                
                thrown = true;
            }            
            assertFalse(thrown);
            
            Country foundCountry = dao.find(country.getId());
            assertNotNull(foundCountry);

            thrown = false;
            try {
                dao.beginTransaction();
                dao.delete(foundCountry);
                dao.commit();
            } catch ( Exception e ) {
                System.out.println(e);
                dao.rollback();                
                thrown = true;
            }            
            assertFalse(thrown);                     
            
        }

Das Programm stößt sich am letzten try-catch Block genauer gesagt an dao.delete(foundCountry). Er stößt sich hieran allerdings nur wenn ich Kinder (sprich CountryNames) der Klasse hinzufüge. Er gibt als Exception aus

Exception Description: The attribute [id] of class [roy.entities.localisation.Language] is mapped to a primary key column in the database. Updates are not allowed.

Ich verstehe nur nicht so ganz wo der Zusammenhang zwischen delete “CountryName” und update ID der Language (lt. Meldung) besteht. Und wie muss ich es korrekt schreiben?