-->
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: Can I create user type to cover a one to many relationship?
PostPosted: Wed Nov 14, 2007 6:35 am 
Newbie

Joined: Wed Nov 14, 2007 5:27 am
Posts: 1
Hibernate version: 3.2.3

I would like to create a user type to replace the following block of mapping scripts scattered in my mapping files:

<component update="true" insert="true" optimistic-lock="false" name="name" class="com.infor.gf.core.domain.ContextLocalisationDictionary">

<property name="maxStringLength" type="java.lang.Integer" access="field" column="c_Max_Name_Length"/>
<property name="contextId" type="java.lang.String" access="field" column="c_Context_Id_Name"/>
<property name="defaultValue" type="java.lang.String" column="c_Default_Value"/>

<!-- List<ContextLocaleValueForHibernate> contextLocaleValuesForHibernate -->
<list name="contextLocaleValuesForHibernate" table="coaChartOfAccounts_Name_Values" lazy="false" cascade="all">
<key column="c_ChartOfAccounts_Id"/>
<list-index column="c_Index"/>
<composite-element class="com.infor.gf.core.domain.ContextLocaleValueForHibernate">
<property name="contextId" unique-key="all" column="c_Context" type="java.lang.String" not-null="true" access="field"/>
<property name="locale" unique-key="all" column="c_Locale" type="java.util.Locale" not-null="true" access="field"/>
<property name="value" unique-key="all" column="c_Value" type="java.lang.String" length="75" not-null="true" access="field"/>
</composite-element>
</list>
</component>

I wonder if it is possible to make a class implements, for example, CompositeUserType to do such work? Could anyone help me?

Thanks


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.