ObjectDB ObjectDB

_PersistenceException: Type is not found on getSingleResult.

#1

Greetings.

I'm new to ObjectDB. I'm using an ObjectDB local database for a Java SE standalone application and i'm having issues querying for an object of this entity:


@Entity
public class Estudiante{
    @Id
    @GeneratedValue
    private Integer id;
   
    @Column
    private String identificacion;
   
    private TipoIdentificacion tipo;
   
    @Temporal(TemporalType.DATE)
    private Date fechaNacimiento;
   
    private String primerNombre;
   
    private String segundoNombre;
   
    private String primerApellido;
   
    private String segundoApellido;

    @ManyToOne
    private Municipio lugarNacimiento;
   
    @OneToMany(mappedBy = "estudiante", cascade = CascadeType.ALL, orphanRemoval = true)
    private List<Acudiente> acudientes;

    public Municipio getLugarNacimiento() {
        return lugarNacimiento;
    }

    public void setLugarNacimiento(Municipio lugarNacimiento) {
        this.lugarNacimiento = lugarNacimiento;
    }

    public List<Acudiente> getAcudientes() {
        return acudientes;
    }
   
    public Acudiente agregarAcudiente(){
        Acudiente nuevo = new Acudiente(this, new Responsable(), null);
        if(acudientes == null)
            acudientes = new ArrayList<>();
        this.acudientes.add(nuevo);
        return nuevo;
    }
   
    public void removerAcudiente(Acudiente acudiente){
        if(acudientes != null)
            this.acudientes.remove(acudiente);
    }
}

Whenever i do this query on an emtpy database that's been initialized i get this error:

com.objectdb.o._PersistenceException: Type Estudiante is not found

For this query:

select est from Estudiante est where est.identificacion = :identificacion

Any help would be appreciated.

edit
delete
#2

Please see this forum thread.

ObjectDB Support
edit
delete

Reply

To post on this website please sign in.