-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Ingres proble during a query...
PostPosted: Tue Feb 14, 2006 1:29 pm 
Newbie

Joined: Tue Oct 11, 2005 10:57 am
Posts: 13
Hi.

I had the folowing problem during a quering in Ingres 3.0.2:

"Request to retrieve BLOB column which had already been accessed. BLOB columns may only be accessed once."

But I dont have any BLOB field in my table!!!

This is the query constructed by Hibernate:

Code:
select this_.curId as curId0_, this_.curNome as curNome12_0_, this_.curDescricao as curDescr3_12_0_, this_.curObjetivo as curObjet4_12_0_, this_.curCargaHoraria as curCarga5_12_0_, this_.curPeriodicidade as curPerio6_12_0_, this_.curDataAprovacaoCapes as curDataA7_12_0_, this_.curDataAprovacaoConsUni as curDataA8_12_0_, this_.curDuracaoMaxima as curDurac9_12_0_, this_.curDuracaoMinima as curDura10_12_0_, this_.curTempoCarteirinha as curTemp11_12_0_, this_.prgId as prgId12_0_, case when this_1_.curId is not null then 1 when this_2_.curId is not null then 2 when this_.curId is not null then 0 end as clazz_0_ from Curso this_ left outer join Doutorado this_1_ on this_.curId=this_1_.curId left outer join Mestrado this_2_ on this_.curId=this_2_.curId order by this_.curNome asc


When I run the query in the SQL console in Ingres, it`s working fine.

This is the SQL and mapping file:

Code:
/*==============================================================*/
/* Table: Curso                                                 */
/*==============================================================*/
create table Curso (
   curId                Integer              not null,
   prgId                Integer              not null,
   curNome              Varchar(150)         not null,
   curDescricao         Long Varchar         with null,
   curObjetivo          Long Varchar         with null,
   curCargaHoraria      Smallint             not null,
   curPeriodicidade     Smallint             not null,
   curDataAprovacaoCapes Date                 with null,
   curDataAprovacaoConsUni Date                 with null,
   curDuracaoMinima     Smallint             not null,
   curDuracaoMaxima     Smallint             not null,
   curTempoCarteirinha  Smallint             not null,
   curUltimoRA          Integer              with null,
   constraint CPK_CURSO primary key (curId)
);



Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping
   PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="org.intellegentia.propgweb.business.general">
    <class name="Curso" table="Curso" lazy="true">
        <!-- Identificador -->
         <id name="id" column="curId">
            <generator class="increment"/>
        </id>
       
        <!-- Propriedades da Classe Curso -->
        <property name="nome"                 column="curNome"/>
        <property name="descricao"            column="curDescricao"            type="text"/>
        <property name="objetivo"             column="curObjetivo"             type="text"/>
        <property name="cargaHoraria"         column="curCargaHoraria"/>
        <property name="periodicidade"        column="curPeriodicidade"/>
        <property name="dataAprovacaoCapes"   column="curDataAprovacaoCapes"   type="date"/>
        <property name="dataAprovacaoConsUni" column="curDataAprovacaoConsUni" type="date"/>
        <property name="duracaoMaxima"        column="curDuracaoMaxima"/>
        <property name="duracaoMinima"        column="curDuracaoMinima"/>
        <property name="tempoCarteirinha"     column="curTempoCarteirinha"/>
       
        <many-to-one name="programa" column="prgId" class="Programa"/>
               
        <set name="areasUFSCar" table="curso_areaufscar">
            <key column="curId"/>
            <composite-element class="CursoAreaUFSCar">
                <parent name="curso"/>
                <many-to-one name="areaUFSCar" class="AreaUFSCar" column="aruId"/>
                <property name="dataDeAssociacao" column="dataDeAssociacao"/>                               
            </composite-element>
        </set>
       

    </class>
</hibernate-mapping>


The table Mestrado and Doutorado are just tables with the curId as atritute, so I don't put they here (Curso is the superclass and Mestrado and Doutorado are the subclasses).

Any tip to resolve this problem?

Thanks in advance.

Reinaldo.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.