-->
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: please help!!!! use of <any> in elemets of a Map
PostPosted: Thu Dec 18, 2003 10:07 am 
Newbie

Joined: Tue Dec 16, 2003 6:08 am
Posts: 8
I'm trying to use Maps that contains <any> types, pleas can anyOne tell me how to use it?.

I have founded that exits type="object" but i don't kown how to use it either.
Code:
<map name="itsParameters"
           table="Element_Parameters"
           >
           <key column="network_parameter_map"/>
           <index column="network_parameter_map_key" type="string"/>
               
           <element column="parameterInMap" type="object">
             <column name="Map"/>
             <column name="Map_Class_id"/>
           </element>
      </map>

What is wrong here?

and here?
Code:
   <map name="itsParameters"
           table="Element_Parameters"
           >
           <key column="network_parameter_map"/>
           <index column="network_parameter_map_key" type="string"/>
               <element column="parameterInMap" type="object"/>
      </map>

It seems work but when i try to hibernate it gives me a: Transaction RolledbackException Array OutOfBound 1

thnx in advance,
JM[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 18, 2003 10:12 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
Use <many-to-any>


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 18, 2003 10:28 am 
Newbie

Joined: Tue Dec 16, 2003 6:08 am
Posts: 8
Thank you Gavin,
Now, i'm trying to hibernate my test class "NetworkArea" that contais a Map with a String... but hibernate give me this error
Code:
15:28:21,872 INFO  [STDOUT] [ObjectDbAccess] *ERROR* (*) Unable to store object (class NetworkArea) in database: No persister for: java.lang.String
15:28:21,888 WARN  [JDBCExceptionReporter] SQL Error: 1048, SQLState: S1000
15:28:21,888 ERROR [JDBCExceptionReporter] General error,  message from server: "Column 'dataid' cannot be null"
15:28:21,888 ERROR [JDBCExceptionReporter] Could not synchronize database state with session
java.sql.BatchUpdateException: General error,  message from server: "Column 'dataid' cannot be null"


What happend?[/code]


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