2 Replies Latest reply on Feb 22, 2008 11:49 AM by adriju

    Problem removing an entity from DB

    adriju

      Hi all!


      I get an error when trying to persist or remove an entity from my 9i Oracle DB. But I do not get this error when updating. The error is:


      Caused by javax.servlet.ServletException with message: "#{fichasHome.remove}: 
      javax.persistence.PersistenceException: org.hibernate.PropertyValueException: not-null property 
      references a null or transient value: com.Fichas.equipos"



      The entity that I am trying to delete is fichas.java:


      @Entity
      @Table(name = "FICHAS")
      public class Fichas implements java.io.Serializable {
      
           private long codFichas;
           private DatosEmpresa datosEmpresa;
           private Categorias1 categorias1;
           private Doscategorias doscategorias;
           private Equipos equipos;
           private Ubicaciones ubicaciones;
           private String mnemotecnicoFichas;
           private String comentarioFichas;
           private String usuario1Fichas;
           private String usuario2Fichas;
           private String ficheroFichas;
           private Date fechaUbicacionFichas;
           private String nombreCat1Fichas;
           private String nombreCat2Fichas;
           private Set<Manageddevices> manageddeviceses = new HashSet<Manageddevices>(
                     0);
           private Set<TemispConfiguracion> temispConfiguracions = new HashSet<TemispConfiguracion>(
                     0);
           private Set<Checks> checkses = new HashSet<Checks>(0);
           private Set<NuevaConfiguracion> nuevaConfiguracions = new HashSet<NuevaConfiguracion>(
                     0);
           private Set<Equipos> equiposes = new HashSet<Equipos>(0);
      
           public Fichas() {
           }
      
           public Fichas(long codFichas, Equipos equipos, Ubicaciones ubicaciones) {
                this.codFichas = codFichas;
                this.equipos = equipos;
                this.ubicaciones = ubicaciones;
           }
           public Fichas(long codFichas, DatosEmpresa datosEmpresa,
                     Categorias1 categorias1, Doscategorias doscategorias,
                     Equipos equipos, Ubicaciones ubicaciones,
                     String mnemotecnicoFichas, String comentarioFichas,
                     String usuario1Fichas, String usuario2Fichas, String ficheroFichas,
                     Date fechaUbicacionFichas, String nombreCat1Fichas,
                     String nombreCat2Fichas, Set<Manageddevices> manageddeviceses,
                     Set<TemispConfiguracion> temispConfiguracions,
                     Set<Checks> checkses, Set<NuevaConfiguracion> nuevaConfiguracions,
                     Set<Equipos> equiposes) {
                this.codFichas = codFichas;
                this.datosEmpresa = datosEmpresa;
                this.categorias1 = categorias1;
                this.doscategorias = doscategorias;
                this.equipos = equipos;
                this.ubicaciones = ubicaciones;
                this.mnemotecnicoFichas = mnemotecnicoFichas;
                this.comentarioFichas = comentarioFichas;
                this.usuario1Fichas = usuario1Fichas;
                this.usuario2Fichas = usuario2Fichas;
                this.ficheroFichas = ficheroFichas;
                this.fechaUbicacionFichas = fechaUbicacionFichas;
                this.nombreCat1Fichas = nombreCat1Fichas;
                this.nombreCat2Fichas = nombreCat2Fichas;
                this.manageddeviceses = manageddeviceses;
                this.temispConfiguracions = temispConfiguracions;
                this.checkses = checkses;
                this.nuevaConfiguracions = nuevaConfiguracions;
                this.equiposes = equiposes;
           }
      
           @Id
           @Column(name = "COD_FICHAS", unique = true, nullable = false, precision = 10, scale = 0)
           @NotNull
           public long getCodFichas() {
                return this.codFichas;
           }
      
           public void setCodFichas(long codFichas) {
                this.codFichas = codFichas;
           }
           @ManyToOne(fetch = FetchType.LAZY)
           @JoinColumn(name = "COD_EMPRESA")
           public DatosEmpresa getDatosEmpresa() {
                return this.datosEmpresa;
           }
      
           public void setDatosEmpresa(DatosEmpresa datosEmpresa) {
                this.datosEmpresa = datosEmpresa;
           }
           @ManyToOne(fetch = FetchType.LAZY)
           @JoinColumn(name = "COD_UNOCATEGORIAS")
           public Categorias1 getCategorias1() {
                return this.categorias1;
           }
      
           public void setCategorias1(Categorias1 categorias1) {
                this.categorias1 = categorias1;
           }
           @ManyToOne(fetch = FetchType.LAZY)
           @JoinColumn(name = "COD_DOSCATEGORIAS")
           public Doscategorias getDoscategorias() {
                return this.doscategorias;
           }
      
           public void setDoscategorias(Doscategorias doscategorias) {
                this.doscategorias = doscategorias;
           }
           @ManyToOne(fetch = FetchType.LAZY)
           @JoinColumn(name = "COD_EQUIPOS", nullable = false)
           @NotNull
           public Equipos getEquipos() {
                return this.equipos;
           }
      
           public void setEquipos(Equipos equipos) {
                this.equipos = equipos;
           }
           @ManyToOne(fetch = FetchType.LAZY)
           @JoinColumn(name = "COD_UBICACIONES", nullable = false)
           @NotNull
           public Ubicaciones getUbicaciones() {
                return this.ubicaciones;
           }
      
           public void setUbicaciones(Ubicaciones ubicaciones) {
                this.ubicaciones = ubicaciones;
           }
      
           @Column(name = "MNEMOTECNICO_FICHAS", length = 31)
           @Length(max = 31)
           public String getMnemotecnicoFichas() {
                return this.mnemotecnicoFichas;
           }
      
           public void setMnemotecnicoFichas(String mnemotecnicoFichas) {
                this.mnemotecnicoFichas = mnemotecnicoFichas;
           }
      
           @Column(name = "COMENTARIO_FICHAS", length = 1024)
           @Length(max = 1024)
           public String getComentarioFichas() {
                return this.comentarioFichas;
           }
      
           public void setComentarioFichas(String comentarioFichas) {
                this.comentarioFichas = comentarioFichas;
           }
      
           @Column(name = "USUARIO1_FICHAS", length = 100)
           @Length(max = 100)
           public String getUsuario1Fichas() {
                return this.usuario1Fichas;
           }
      
           public void setUsuario1Fichas(String usuario1Fichas) {
                this.usuario1Fichas = usuario1Fichas;
           }
      
           @Column(name = "USUARIO2_FICHAS", length = 100)
           @Length(max = 100)
           public String getUsuario2Fichas() {
                return this.usuario2Fichas;
           }
      
           public void setUsuario2Fichas(String usuario2Fichas) {
                this.usuario2Fichas = usuario2Fichas;
           }
      
           @Column(name = "FICHERO_FICHAS", length = 16)
           @Length(max = 16)
           public String getFicheroFichas() {
                return this.ficheroFichas;
           }
      
           public void setFicheroFichas(String ficheroFichas) {
                this.ficheroFichas = ficheroFichas;
           }
           @Temporal(TemporalType.DATE)
           @Column(name = "FECHA_UBICACION_FICHAS", length = 7)
           public Date getFechaUbicacionFichas() {
                return this.fechaUbicacionFichas;
           }
      
           public void setFechaUbicacionFichas(Date fechaUbicacionFichas) {
                this.fechaUbicacionFichas = fechaUbicacionFichas;
           }
      
           @Column(name = "NOMBRE_CAT1_FICHAS", length = 60)
           @Length(max = 60)
           public String getNombreCat1Fichas() {
                return this.nombreCat1Fichas;
           }
      
           public void setNombreCat1Fichas(String nombreCat1Fichas) {
                this.nombreCat1Fichas = nombreCat1Fichas;
           }
      
           @Column(name = "NOMBRE_CAT2_FICHAS", length = 60)
           @Length(max = 60)
           public String getNombreCat2Fichas() {
                return this.nombreCat2Fichas;
           }
      
           public void setNombreCat2Fichas(String nombreCat2Fichas) {
                this.nombreCat2Fichas = nombreCat2Fichas;
           }
           @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "fichas")
           public Set<Manageddevices> getManageddeviceses() {
                return this.manageddeviceses;
           }
      
           public void setManageddeviceses(Set<Manageddevices> manageddeviceses) {
                this.manageddeviceses = manageddeviceses;
           }
           @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "fichas")
           public Set<TemispConfiguracion> getTemispConfiguracions() {
                return this.temispConfiguracions;
           }
      
           public void setTemispConfiguracions(
                     Set<TemispConfiguracion> temispConfiguracions) {
                this.temispConfiguracions = temispConfiguracions;
           }
           @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "fichas")
           public Set<Checks> getCheckses() {
                return this.checkses;
           }
      
           public void setCheckses(Set<Checks> checkses) {
                this.checkses = checkses;
           }
           @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "fichas")
           public Set<NuevaConfiguracion> getNuevaConfiguracions() {
                return this.nuevaConfiguracions;
           }
      
           public void setNuevaConfiguracions(
                     Set<NuevaConfiguracion> nuevaConfiguracions) {
                this.nuevaConfiguracions = nuevaConfiguracions;
           }
           @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "fichas")
           public Set<Equipos> getEquiposes() {
                return this.equiposes;
           }
      
           public void setEquiposes(Set<Equipos> equiposes) {
                this.equiposes = equiposes;
           }
      
      }
      



      The entity in which the exception is given is equipos.java:


      @Entity
      @Table(name = "EQUIPOS")
      public class Equipos implements java.io.Serializable {
      
           private long codEquipos;
           private GruposUsuarios gruposUsuarios;
           private Tipoequipos tipoequipos;
           private Fichas fichas;
           private String nserieEquipos;
           private String versionEquipos;
           private String direccioninternaEquipos;
           private String direccionaccesoEquipos;
           private String claveAccesoEquipos;
           private String facilidadesEquipos;
           private Byte estadoActual;
           private Date horaEstado;
           private String usuarioFtp;
           private int routerMaestro;
           private int noStaticIp;
           private Date ultimoAccesoValido;
           private Date ultimoAccesoFallido;
           private Set<Manageddevices> manageddeviceses = new HashSet<Manageddevices>(
                     0);
           private Set<IpsecCentralServers> ipsecCentralServerses = new HashSet<IpsecCentralServers>(
                     0);
           private Set<AinstdLog> ainstdLogs = new HashSet<AinstdLog>(0);
           private Set<Fichas> fichases = new HashSet<Fichas>(0);
           private Set<TeCircuit> teCircuits = new HashSet<TeCircuit>(0);
           private Set<TemisE> temisEs = new HashSet<TemisE>(0);
           private Set<IpsecData> ipsecDatas = new HashSet<IpsecData>(0);
           private Set<TrapCustomerData> trapCustomerDatas = new HashSet<TrapCustomerData>(
                     0);
           private Set<FechaUbicacion> fechaUbicacions = new HashSet<FechaUbicacion>(0);
      
           public Equipos() {
           }
      
           public Equipos(long codEquipos, GruposUsuarios gruposUsuarios,
                     Tipoequipos tipoequipos, String direccioninternaEquipos,
                     String direccionaccesoEquipos, Date horaEstado, int routerMaestro,
                     int noStaticIp) {
                this.codEquipos = codEquipos;
                this.gruposUsuarios = gruposUsuarios;
                this.tipoequipos = tipoequipos;
                this.direccioninternaEquipos = direccioninternaEquipos;
                this.direccionaccesoEquipos = direccionaccesoEquipos;
                this.horaEstado = horaEstado;
                this.routerMaestro = routerMaestro;
                this.noStaticIp = noStaticIp;
           }
           public Equipos(long codEquipos, GruposUsuarios gruposUsuarios,
                     Tipoequipos tipoequipos, Fichas fichas, String nserieEquipos,
                     String versionEquipos, String direccioninternaEquipos,
                     String direccionaccesoEquipos, String claveAccesoEquipos,
                     String facilidadesEquipos, Byte estadoActual, Date horaEstado,
                     String usuarioFtp, int routerMaestro, int noStaticIp,
                     Date ultimoAccesoValido, Date ultimoAccesoFallido,
                     Set<Manageddevices> manageddeviceses,
                     Set<IpsecCentralServers> ipsecCentralServerses,
                     Set<AinstdLog> ainstdLogs, Set<Fichas> fichases,
                     Set<TeCircuit> teCircuits, Set<TemisE> temisEs,
                     Set<IpsecData> ipsecDatas, Set<TrapCustomerData> trapCustomerDatas,
                     Set<FechaUbicacion> fechaUbicacions) {
                this.codEquipos = codEquipos;
                this.gruposUsuarios = gruposUsuarios;
                this.tipoequipos = tipoequipos;
                this.fichas = fichas;
                this.nserieEquipos = nserieEquipos;
                this.versionEquipos = versionEquipos;
                this.direccioninternaEquipos = direccioninternaEquipos;
                this.direccionaccesoEquipos = direccionaccesoEquipos;
                this.claveAccesoEquipos = claveAccesoEquipos;
                this.facilidadesEquipos = facilidadesEquipos;
                this.estadoActual = estadoActual;
                this.horaEstado = horaEstado;
                this.usuarioFtp = usuarioFtp;
                this.routerMaestro = routerMaestro;
                this.noStaticIp = noStaticIp;
                this.ultimoAccesoValido = ultimoAccesoValido;
                this.ultimoAccesoFallido = ultimoAccesoFallido;
                this.manageddeviceses = manageddeviceses;
                this.ipsecCentralServerses = ipsecCentralServerses;
                this.ainstdLogs = ainstdLogs;
                this.fichases = fichases;
                this.teCircuits = teCircuits;
                this.temisEs = temisEs;
                this.ipsecDatas = ipsecDatas;
                this.trapCustomerDatas = trapCustomerDatas;
                this.fechaUbicacions = fechaUbicacions;
           }
      
           @Id
           @Column(name = "COD_EQUIPOS", unique = true, nullable = false, precision = 10, scale = 0)
           @NotNull
           public long getCodEquipos() {
                return this.codEquipos;
           }
      
           public void setCodEquipos(long codEquipos) {
                this.codEquipos = codEquipos;
           }
           @ManyToOne(fetch = FetchType.LAZY)
           @JoinColumn(name = "COD_GRUPOS_USUARIOS", nullable = false)
           @NotNull
           public GruposUsuarios getGruposUsuarios() {
                return this.gruposUsuarios;
           }
      
           public void setGruposUsuarios(GruposUsuarios gruposUsuarios) {
                this.gruposUsuarios = gruposUsuarios;
           }
           @ManyToOne(fetch = FetchType.LAZY)
           @JoinColumn(name = "COD_TIPOEQUIPOS", nullable = false)
           @NotNull
           public Tipoequipos getTipoequipos() {
                return this.tipoequipos;
           }
      
           public void setTipoequipos(Tipoequipos tipoequipos) {
                this.tipoequipos = tipoequipos;
           }
           @ManyToOne(fetch = FetchType.LAZY)
           @JoinColumn(name = "COD_FICHAS")
           public Fichas getFichas() {
                return this.fichas;
           }
      
           public void setFichas(Fichas fichas) {
                this.fichas = fichas;
           }
      
           @Column(name = "NSERIE_EQUIPOS", length = 22)
           @Length(max = 22)
           public String getNserieEquipos() {
                return this.nserieEquipos;
           }
      
           public void setNserieEquipos(String nserieEquipos) {
                this.nserieEquipos = nserieEquipos;
           }
      
           @Column(name = "VERSION_EQUIPOS", length = 75)
           @Length(max = 75)
           public String getVersionEquipos() {
                return this.versionEquipos;
           }
      
           public void setVersionEquipos(String versionEquipos) {
                this.versionEquipos = versionEquipos;
           }
      
           @Column(name = "DIRECCIONINTERNA_EQUIPOS", nullable = false, length = 20)
           @NotNull
           @Length(max = 20)
           public String getDireccioninternaEquipos() {
                return this.direccioninternaEquipos;
           }
      
           public void setDireccioninternaEquipos(String direccioninternaEquipos) {
                this.direccioninternaEquipos = direccioninternaEquipos;
           }
      
           @Column(name = "DIRECCIONACCESO_EQUIPOS", nullable = false, length = 20)
           @NotNull
           @Length(max = 20)
           public String getDireccionaccesoEquipos() {
                return this.direccionaccesoEquipos;
           }
      
           public void setDireccionaccesoEquipos(String direccionaccesoEquipos) {
                this.direccionaccesoEquipos = direccionaccesoEquipos;
           }
      
           @Column(name = "CLAVE_ACCESO_EQUIPOS", length = 20)
           @Length(max = 20)
           public String getClaveAccesoEquipos() {
                return this.claveAccesoEquipos;
           }
      
           public void setClaveAccesoEquipos(String claveAccesoEquipos) {
                this.claveAccesoEquipos = claveAccesoEquipos;
           }
      
           @Column(name = "FACILIDADES_EQUIPOS", length = 16)
           @Length(max = 16)
           public String getFacilidadesEquipos() {
                return this.facilidadesEquipos;
           }
      
           public void setFacilidadesEquipos(String facilidadesEquipos) {
                this.facilidadesEquipos = facilidadesEquipos;
           }
      
           @Column(name = "ESTADO_ACTUAL", precision = 2, scale = 0)
           public Byte getEstadoActual() {
                return this.estadoActual;
           }
      
           public void setEstadoActual(Byte estadoActual) {
                this.estadoActual = estadoActual;
           }
           @Temporal(TemporalType.DATE)
           @Column(name = "HORA_ESTADO", nullable = false, length = 7)
           @NotNull
           public Date getHoraEstado() {
                return this.horaEstado;
           }
      
           public void setHoraEstado(Date horaEstado) {
                this.horaEstado = horaEstado;
           }
      
           @Column(name = "USUARIO_FTP", length = 20)
           @Length(max = 20)
           public String getUsuarioFtp() {
                return this.usuarioFtp;
           }
      
           public void setUsuarioFtp(String usuarioFtp) {
                this.usuarioFtp = usuarioFtp;
           }
      
           @Column(name = "ROUTER_MAESTRO", nullable = false, precision = 1, scale = 0)
           @NotNull
           public int getRouterMaestro() {
                return this.routerMaestro;
           }
      
           public void setRouterMaestro(int routerMaestro) {
                this.routerMaestro = routerMaestro;
           }
      
           @Column(name = "NO_STATIC_IP", nullable = false, precision = 1, scale = 0)
           @NotNull
           public int getNoStaticIp() {
                return this.noStaticIp;
           }
      
           public void setNoStaticIp(int noStaticIp) {
                this.noStaticIp = noStaticIp;
           }
           @Temporal(TemporalType.DATE)
           @Column(name = "ULTIMO_ACCESO_VALIDO", length = 7)
           public Date getUltimoAccesoValido() {
                return this.ultimoAccesoValido;
           }
      
           public void setUltimoAccesoValido(Date ultimoAccesoValido) {
                this.ultimoAccesoValido = ultimoAccesoValido;
           }
           @Temporal(TemporalType.DATE)
           @Column(name = "ULTIMO_ACCESO_FALLIDO", length = 7)
           public Date getUltimoAccesoFallido() {
                return this.ultimoAccesoFallido;
           }
      
           public void setUltimoAccesoFallido(Date ultimoAccesoFallido) {
                this.ultimoAccesoFallido = ultimoAccesoFallido;
           }
           @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "equipos")
           public Set<Manageddevices> getManageddeviceses() {
                return this.manageddeviceses;
           }
      
           public void setManageddeviceses(Set<Manageddevices> manageddeviceses) {
                this.manageddeviceses = manageddeviceses;
           }
           @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "equipos")
           public Set<IpsecCentralServers> getIpsecCentralServerses() {
                return this.ipsecCentralServerses;
           }
      
           public void setIpsecCentralServerses(
                     Set<IpsecCentralServers> ipsecCentralServerses) {
                this.ipsecCentralServerses = ipsecCentralServerses;
           }
           @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "equipos")
           public Set<AinstdLog> getAinstdLogs() {
                return this.ainstdLogs;
           }
      
           public void setAinstdLogs(Set<AinstdLog> ainstdLogs) {
                this.ainstdLogs = ainstdLogs;
           }
           @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "equipos")
           public Set<Fichas> getFichases() {
                return this.fichases;
           }
      
           public void setFichases(Set<Fichas> fichases) {
                this.fichases = fichases;
           }
           @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "equipos")
           public Set<TeCircuit> getTeCircuits() {
                return this.teCircuits;
           }
      
           public void setTeCircuits(Set<TeCircuit> teCircuits) {
                this.teCircuits = teCircuits;
           }
           @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "equipos")
           public Set<TemisE> getTemisEs() {
                return this.temisEs;
           }
      
           public void setTemisEs(Set<TemisE> temisEs) {
                this.temisEs = temisEs;
           }
           @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "equipos")
           public Set<IpsecData> getIpsecDatas() {
                return this.ipsecDatas;
           }
      
           public void setIpsecDatas(Set<IpsecData> ipsecDatas) {
                this.ipsecDatas = ipsecDatas;
           }
           @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "equipos")
           public Set<TrapCustomerData> getTrapCustomerDatas() {
                return this.trapCustomerDatas;
           }
      
           public void setTrapCustomerDatas(Set<TrapCustomerData> trapCustomerDatas) {
                this.trapCustomerDatas = trapCustomerDatas;
           }
           @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "equipos")
           public Set<FechaUbicacion> getFechaUbicacions() {
                return this.fechaUbicacions;
           }
      
           public void setFechaUbicacions(Set<FechaUbicacion> fechaUbicacions) {
                this.fechaUbicacions = fechaUbicacions;
           }
      
      }
      



      I have tried to remove the @NotNull annotation first and then nullable=false and then the two at the same time from the column COD_EQUIPOS from fichas.java but this doesn't work.


           @ManyToOne(fetch = FetchType.LAZY)
           @JoinColumn(name = "COD_EQUIPOS", nullable = false)
           @NotNull
           public Equipos getEquipos() {
                return this.equipos;
           }



      The code in the Fichas.xhtml that does the entity's removal is:


      <h:commandButton "id="delete" value="Delete" action="#{fichasHome.remove}" rendered="#{fichasHome.managed}"/>



      I have tested several things but I haven't found how to fis this.


      Could anyone help?


      Thanks in advance!


      This new forum is superb!

        • 1. Re: Problem removing an entity from DB
          baz

          First of all this is an Hibernate question. Try to find advice in the hibernate forum.


          Second, my guess:


          You have 2 associations from Fichas to Equipos


          1 @ManyToOne(fetch = FetchType.LAZY)
          
               @JoinColumn(name = "COD_EQUIPOS", nullable = false)
          
               @NotNull
          
               public Equipos getEquipos() {
          
                    return this.equipos;
          
               }
          
          2R @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "fichas")
          
               public Set<Equipos> getEquiposes() {
          
                    return this.equiposes;
          
               }



          and 2 references from Equipos to  Fichas


          1R @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "equipos")
          
               public Set<Fichas> getFichases() {
          
                    return this.fichases;
          
               }
          
          2 @ManyToOne(fetch = FetchType.LAZY)
          
               @JoinColumn(name = "COD_FICHAS")
          
               public Fichas getFichas() {
          
                    return this.fichas;
          
               }
          
          


          Because of that, hibernate is not able to persist or remove an entity.


          Both of your associations are bidirectional. I have marked these associations with 1,1R for the first and 2 2R for the second.


          So you can  get rid of one association without harm.


          For further assistence feel free to contact the hibernate forum.


          Ciao,

          Carsten

          • 2. Re: Problem removing an entity from DB
            adriju

            Thanks for your help. I solved the problem. What I did was to create (persist) first the entity Equipos and assign it to Fichas, and then persist Fichas entity.


            To remove one Fichas entity from the DB, I did the same, first remove Equipos and then Fichas.