-->
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: Mapping map parameters at runtime
PostPosted: Sat Apr 09, 2005 2:32 pm 
Regular
Regular

Joined: Fri Feb 13, 2004 10:02 pm
Posts: 90
Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
3.0.rc1
Mapping documents:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="com.llic.calc.variable">
  <joined-subclass name="ConstantVariable" table="ConstantVariable" extends="Variable">
   
   <meta attribute="generated-class">com.llic.calc.variable.base.ConstantVariable</meta>
   
   <key column="variableId"/>
         
   <property name="className" column="className" type="string"/>
   
   <!-- All properties to fill on a database object-->
   <bag name="properties" table="objectProperties" >
         <key column="variableId"/>
         <element type="string"/>
   </bag>
   
   <map name="parameters">
      
      <key column="variableId"/>
      <map-key type="string" column="paramName"/>
      <element type="java.lang.Object"/>
      
   
   </map>
   
  </joined-subclass>
</hibernate-mapping>


Name and version of the database you are using:
MySQL 4.0

Hi all, I have a question I cannot seem to find the answer to.

I have an object DatabaseVariable that represents a runtime variable, where the parameters are name value pairs. The name is a String of the variable name, but they type could be any "primitive" Java runtime object.
The types are currently restricted to Double, String, and java.util.Date. Dynamic component seems appropriate here, but I am unsure how to utilize it. Could anyone offer any suggestions/advice?

Thanks,
Todd


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.