-->
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: could not bind value - Problem mit Großschreibung?
PostPosted: Fri Apr 21, 2006 7:46 am 
Newbie

Joined: Fri Aug 05, 2005 9:55 am
Posts: 9
Hallo,

ich habe ein recht seltsames Problem, was mir leider auch erst nach einiger Zeit auffällt. Und zwar habe ich ein Project welches 10 Parameter hat, die aus je anderen Tabellen kommen. Diese Parameter kann man löschen und erweitern. Beim löschen tritt allerdings folgender Fehler auf:

Es wird versucht:
Code:
session.createQuery("delete BU where BUId in (:ids)")
                      .setParameterList("ids", req.getParameterValues("delete"))
                      .executeUpdate();

Und das kommt dabei heraus:
Quote:
O Hibernate: delete from BU where BUId in (? , ?)
IntegerType I org.hibernate.type.IntegerType could not bind value '32' to parameter: 1
IntegerType I org.hibernate.type.IntegerType could not bind value '31' to parameter: 2


Allerdings nur bei den Folgenden Parametern: BU, PRM, PS. Die alle eins gemeinsam haben - sie sind großgeschrieben, die anderen nicht.
Kann es daran liegen? Andere Möglichkeiten?

Ein save geht ohne Probleme.

Danke und ein schönes Wochenende!
Zwitsch

PS: Diesen Post habe ich im Internet gefunden, werde aber nicht recht schlau daraus, da der eigentlich sagt, dass meine Namen in Ordnung sind: http://galaxy.andromda.org/jira/browse/HIB-57

Hibernate version: 3.1.2

Mapping documents:
Code:
<hibernate-mapping>
   <class name="com.hbm.Project" table="Project" lazy="false">
      <id name="projectId" column="ProjectId" type="integer" unsaved-value="0">
         <generator class="native">
         </generator>
      </id>
      <property name="projectNo" column="ProjectNo" type="integer" not-null="false"/>
      <many-to-one name="Priority" cascade="lock" column="PriorityId" class="com.hbm.Priority">
      </many-to-one>
      <many-to-one name="Champion" cascade="lock" column="ChampionId" class="com.hbm.Champion">
      </many-to-one>
      <many-to-one name="PRM" cascade="lock" column="PRMId" class="com.hbm.PRM">
      </many-to-one>
      <many-to-one name="PS" cascade="lock" column="PSId" class="com.hbm.PS">
      </many-to-one>
      <many-to-one name="Plant" cascade="lock" column="PlantId" class="com.hbm.Plant">
      </many-to-one>
      <many-to-one name="Category" cascade="lock" column="CategoryId" class="com.hbm.Category">
      </many-to-one>
      <many-to-one name="RnDMapGrouping" cascade="lock" column="RnDMapGroupingId" class="com.hbm.RnDMapGrouping">
      </many-to-one>
      <many-to-one name="StageInFunnel" cascade="lock" column="StageInFunnelId" class="com.hbm.StageInFunnel">
      </many-to-one>
      <many-to-one name="Status" cascade="lock" column="StatusId" class="com.hbm.Status">
      </many-to-one>
      <many-to-one name="BU" cascade="lock" column="BUId" class="com.hbm.BU">
      </many-to-one>
      <many-to-one name="ProjectType" cascade="lock" column="ProjectTypeId" class="com.hbm.ProjectType">
      </many-to-one>
   </class>

</hibernate-mapping>


Code:
<hibernate-mapping>
   <class name="com.hbm.BU" table="BU" lazy="false">
      <id name="BUId" column="BUId" type="integer" unsaved-value="0">
         <generator class="native">
         </generator>
      </id>
      <property name="name" column="Name" type="string" length="255" not-null="false"/>
      <property name="funnelColor" column="FunnelColor" type="string" length="255" not-null="false"/>
      <set name="Project" lazy="true" cascade="save-update,lock" inverse="true">
         <key column="BUId" not-null="false"/>
         <one-to-many class="com.hbm.Project"/>
      </set>
   </class>
</hibernate-mapping>


Name and version of the database you are using: MSSQL 2000


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.