HibernateTemplate selects wrong table

I have a problem with a table that has the same columns but different ID.
Whenever I try to get or save from this table, I get an Identifier error, it seams to match another table.
I checked the class and ID and is OK. Even I had a problem with cases I put every ID in lowercase.

session.save(AdhesionResumenTCHist.class.getName(), hist);

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"

    <class name="ar.com.demo.batch.domain.AdhesionResumenTCHist" table="adhesion_resumen_tc_hist">
        <id name="idAdhHist" type="long" column="adhesion_resumen_tc_hist_id">
            <generator class="sequence-identity">
                <param name="sequence">seq_adhesion_resumen_tc_hist</param>

        <property name="email" column="email" type="string"/>
        <property name="estado" column="estado" type="string"/>
        <property name="fechaAlta" column="fecha_alta" type="timestamp"/>
        <many-to-one name="usuario" column="usuario_id" lazy="false" cascade="all"

        <many-to-one name="tarjetaCred" column="hash_tarjeta" lazy="false"
                     cascade="all" class="ar.com.demo.batch.domain.TarjetaCredito"/>
        <property name="origen" column="origen" type="string"/>


2020-11-22 18:39:20 WARN  org.hibernate.engine.jdbc.spi.SqlExceptionHelper:127 - SQL Error: 1, SQLState: 23000
2020-11-22 18:39:20 ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper:129 - Invalid argument(s) in call
2020-11-22 18:39:20 ERROR ar.com.demo.batch.record.writer.FileRecordWriter:95 - could not prepare statement
org.hibernate.exception.ConstraintViolationException: could not prepare statement
2020-11-22 18:39:20 ERROR org.hibernate.AssertionFailure:33 - HHH000099: an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session): org.hibernate.AssertionFailure: null id in ar.com.demo.batch.domain.AdhesionResumenTCHist entry (don't flush the Session after an exception occurs)

Could you post a stracktrace or code that you use?