Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2005

Tip: Looking for answers? Try searching our database.

hibernate configauration file

Thread view: 
gk - 07 Oct 2005 06:01 GMT
tutorial
http://www.hibernate.org/hib_docs/v3/reference/en/html/tutorial.html
here is config file from this tutorial
===========

<hibernate-mapping>

   <class name="Event" table="EVENTS">
       <id name="id" column="EVENT_ID"> // why type is missing here ?
           <generator class="increment"/>
       </id>
       <property name="date" type="timestamp" column="EVENT_DATE"/> //
type is here.
       <property name="title"/> // why type is missing here ?
   </class>

</hibernate-mapping>

i am surprised to see that some cases in the above "type" has been
mentioned and some other cases "type" has been skipped .

why it is like this ?
Roedy Green - 07 Oct 2005 12:02 GMT
On 6 Oct 2005 22:01:13 -0700, "gk" <srcjnu@gmail.com> wrote or quoted

> <property name="title"/> // why type is missing here ?

one answer is, if you look in the DTD describing Hibernate XML
http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd
you discovered the type field is #IMPLIED

In other words it has a default.  You will have to read the Hibernate
docs to find out what that default is. It is probably whatever SQL
says it is.

Part of what JDBC-Hibernate is about is automatic translation of Java
types to SQL types.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.

Roedy Green - 07 Oct 2005 12:04 GMT
On 6 Oct 2005 22:01:13 -0700, "gk" <srcjnu@gmail.com> wrote or quoted

>http://www.hibernate.org/hib_docs/v3/reference/en/html/tutorial.html
>here is config file from this tutorial

Please don't keep starting new threads with the same question. It
scatters the responses all over.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.