-->
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.  [ 3 posts ] 
Author Message
 Post subject: problem for retrieving calculated attributes
PostPosted: Thu Nov 02, 2006 7:19 am 
Newbie

Joined: Fri Sep 22, 2006 4:17 am
Posts: 10
Hibernate version: 3.1.3

Name and version of the database you are using: Oracle10g

Hi,

here is my mapping:
Code:
   <class table="TSRFILOT" name="Ilot" lazy="false" persister="my.project.IlotPersister">
      <id column="idIlot" name="idIlot" type="string">
         <generator class="my.project.HibernateUuidGenerator"/>
      </id>

      <property column="P1" name="p1" type="integer"/>
      <property column="P2" name="p2" type="string" />

      <many-to-one column="idDemande" name="demande" class="DemandeAide"/>
     
       <loader query-ref="loadIlot"/>
  </class>

  <sql-query name="loadIlot">
    <return alias="ilot" class="Ilot" lock-mode="none" />
    SELECT IDDEMANDE AS {ilot.demande},
           P1 AS {ilot.p1},
           UPPER(P2) AS {ilot.p2},
           IDILOT AS {ilot.idIlot}
    FROM TSRFILOT WHERE IDILOT=?
  </sql-query>


This work fine when I perform a load.
My problem is when I try to perform a select an ilot by p1, the select query is:
Code:
select ilot0_.idIlot as idIlot4_, ilot0_.p1 as p14_, ilot0_.p2 as p24_  from TSRFILOT ilot0_ where ilot0_.p1=?


The UPPER function is an example. Actually, I am not able to perform the function on the insert or update statement.

Thanks in advance


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 02, 2006 5:44 pm 
Newbie

Joined: Fri Sep 22, 2006 4:17 am
Posts: 10
up


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 03, 2006 2:41 am 
Newbie

Joined: Fri Sep 22, 2006 4:17 am
Posts: 10
is there any issue?


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

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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.