-->
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: Hibernate Problem mit meiner ersten Mapping Datei
PostPosted: Fri Jun 29, 2007 12:10 pm 
Newbie

Joined: Fri Jun 29, 2007 12:06 pm
Posts: 4
Hallo zusammen,

Ich habe mir meine erste Mapping Datei erstellt. Leider funktioniert es nicht, weil ich einen Syntax Fehler bekomme.
Irgendwie kommt er mit den filter-def nicht klar und meine Primärspalten (calendarTimeStamp, zoneId) funktionieren nicht, ich komme aber nicht auf den Fehler.

Wie kann ich zwei Spalten aus Primärschlüssel definieren, oder geht das nicht?

Warum funktionieren die Filter nicht?

Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
   "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
   "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="de.tds.ito.visualsolariszone">
  <filter-def name="fCalendarTimeStampAndId">
    <filter-param name="theStartTimestamp" type="timestamp"/>
    <filter-param name="theStopTimestamp" type="timestamp"/>
    <filter-param name="theZoneId" type="integer"/>
  </filter-def>
  <filter-def name="fCalendarTimeStampAndName">
    <filter-param name="theStartTimestamp" type="timestamp"/>
    <filter-param name="theStopTimestamp" type="timestamp"/>
    <filter-param name="theZoneName" type="string"/>
  </filter-def>
  <filter-def name="fId">
    <filter-param name="theZoneId" type="integer"/>
  </filter-def>
  <filter-def name="fName">
    <filter-param name="theZoneName" type="string"/>
  </filter-def>
  <class name="ZoneInfoBean" table="ZONE_INFO_BEAN">
    <id name="calendarTimeStamp" type="timestamp">
      <generator class="native"></generator>
    </id>
    <id name="zoneid">
      <generator class="assigned"></generator>
    </id>
    <properties name="zoneName"></properties>
    <properties name="cpuPercent"></properties>
    <properties name="cpuShares"></properties>
    <properties name="memPercent"></properties>
    <properties name="memRss"></properties>
    <properties name="memSize"></properties>
    <properties name="numProcs"></properties>
    <properties name="selected"></properties>
    <properties name="timeString"></properties>
    <properties name="valid"></properties>
    <properties name="zoneCfgXml"></properties>
    <properties name="zoneHomeDirectory"></properties>
    <properties name="zoneStateString"></properties>
    <filter name="fCalendarTimeStampAndId" condition="(calendarTimeStamp BETWEEN :theStartTimestamp AND :theStopTimestamp) AND zoneid = :theZoneId"></filter>
    <filter name="fCalendarTimeStampAndName" condition="(calendarTimeStamp BETWEEN :theStartTimestamp AND :theStopTimestamp) AND zoneName = :theZoneName"></filter>
    <filter name="fId" condition="zoneid = :theZoneId"></filter>
    <filter name="fName" condition="zoneName = :theZoneName"></filter>
  </class>
</hibernate-mapping>


Gruß
Lukas


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.