-->
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.  [ 7 posts ] 
Author Message
 Post subject: Unify 2000 database
PostPosted: Fri Apr 23, 2004 2:32 am 
Newbie

Joined: Fri Apr 23, 2004 2:29 am
Posts: 12
Hi,

Does anyone use hibernate with Unify 2000 database. I don't undertand what's going wrong in my mapping files : I'm really not sure that Unify database is suppoted !

Pascal


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 23, 2004 6:23 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Unify - wow I had/have a client that had used Unify is a big way. They have dropped it now for Oracle. I spent some time playing with the JDBC driver (about year (year and a half) or so ago) and it was very problematic. Not sure what the status is at the moment but Hibernate does require a quality JDBC v2.0 driver to operate at its best - I doubt the Unify driver (which from memory was an external companies effort) would be the best example.

Having said that, it is easy enough to create a Dialect for the Unify Database. Plent of examples exist in the src tree. I suggest you build a few tests for the kinds of operations you intend to perform. If it works then great. Alternatively, you can try Hibernates' Test suite against Unify if you like. This test suite hammers the driver. If it passed all the tests then your setup will be fine. If not it may well still be OK for the features you are using (or intend to use).


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 23, 2004 6:26 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
BTW: your problem maybe just the mapping files. As such you have not supplied enough information. A simple example would help.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 30, 2004 5:02 am 
Newbie

Joined: Fri Apr 23, 2004 2:29 am
Posts: 12
In fact, I just need to have a read-only access to 2 tables from an Unify database. If I look the network frames, I see the response from the Unify Server corresponding to the request, but Hibernate does not seem to be able to read these results....

Any idea ?

Pascal


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 30, 2004 5:25 am 
Newbie

Joined: Fri Apr 23, 2004 2:29 am
Posts: 12
here are my mapping files, working fine with postgresql, so normally I just need to change datasource in Tomcat configuration...

hibernateWorkplan.hbm.xml :
Code:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration
    PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
    "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">

<hibernate-configuration>

    <session-factory>

        <property name="connection.datasource">java:comp/env/jdbc/workplan</property>
        <property name="show_sql">false</property>
        <property name="jdbc.batch_size">10</property>

        <!-- Mapping files -->
      <mapping resource="fr/ordimoule/portail/hibernate/Client.hbm.xml" />
      <mapping resource="fr/ordimoule/portail/hibernate/Contact.hbm.xml" />
      
    </session-factory>

</hibernate-configuration>



Client.hbm.xml :
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping
    PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">

<hibernate-mapping>

    <class name="fr.ordimoule.portail.commercial.Client" table="tMA008">

        <id name="numeroClient" type="string">
            <column name="ccli010" sql-type="char(10)" not-null="true"/>
            <generator class="uuid.hex"/>
        </id>

        <property name="nomClient"  type="string">
            <column name="ccli040" sql-type="char(40)" not-null="true"/>
        </property>
       
    </class>

</hibernate-mapping>


Contact.hbm.xml :
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping
    PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">

<hibernate-mapping>

    <class name="fr.ordimoule.portail.commercial.Contact" table="contact">

        <id name="numeroContact" type="string">
            <column name="id" sql-type="char(10)" not-null="true"/>
            <generator class="uuid.hex"/>
        </id>

        <property name="nomContact"  type="string">
            <column name="nomcontact" sql-type="char(30)" not-null="true"/>
        </property>
       
        <property name="numeroClient"  type="string">
            <column name="numeroclient" sql-type="char(10)" not-null="true"/>
        </property>
       
    </class>

</hibernate-mapping>


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 30, 2004 8:39 am 
Newbie

Joined: Fri Apr 23, 2004 2:29 am
Posts: 12
Humm... actually, Unify does not seem to support column aliases... isn't it ?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 30, 2004 10:35 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Yes I think so - the UNIFY database was once a great system but now (my understanding when I was using it) its no longer enhanced and only moderately maintained thus its lacking many features you would expect from a comercial DB.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.