-->
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: Derived property within a component
PostPosted: Sun Aug 28, 2005 11:09 pm 
Newbie

Joined: Sun Aug 28, 2005 10:54 pm
Posts: 14
Hello,

I'm trying to organize a bunch of date/time related properties in a component. Some of the properties are computed via the formula attribute. However, when I placed the dervied properties in a component, I received the following exception.

Code:
NHibernate.MappingException
property mapping has wrong number of columns: ClassName.MyNamespace.ClassName type: Time

nhibernate.dll!NHibernate.Mapping.PersistentClass.Validate(NHibernate.Engine.IMapping mapping)
nhibernate.dll!NHibernate.Mapping.RootClass.Validate(NHibernate.Engine.IMapping mapping)
nhibernate.dll!NHibernate.Cfg.Configuration.Validate()
nhibernate.dll!NHibernate.Cfg.Configuration.BuildSessionFactory()


Is the following syntax legal, or is this a genuine problem?

Code:
<component class="MyNamespace.Time, NHibernate.Test" name="HireTime" >
    <property name="Date" column="hire_date" type="DateTime" />
    <property name="Hour" formula="DATEPART(hh, hire_date)" insert="false" update="false" />
</component>


Top
 Profile  
 
 Post subject: Re: Derived property within a component
PostPosted: Wed Sep 07, 2005 11:33 am 
Newbie

Joined: Sun Aug 28, 2005 10:54 pm
Posts: 14
sguidi wrote:
Is the following syntax legal, or is this a genuine problem?

Code:
<component class="MyNamespace.Time, NHibernate.Test" name="HireTime" >
    <property name="Date" column="hire_date" type="DateTime" />
    <property name="Hour" formula="DATEPART(hh, hire_date)" insert="false" update="false" />
</component>


This looks like it is closely related to issues already reported in JIRA:
NH-315, NH-362. I'll open a new issue for tracking purposes (NH-367).


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 07, 2005 11:58 am 
Regular
Regular

Joined: Tue May 24, 2005 12:55 pm
Posts: 56
If these are important to you, please vote on the item(s) in JIRA. There is a link on the left side that says "Vote for it".


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.