-->
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.  [ 2 posts ] 
Author Message
 Post subject: Error after update: could not find constructor for: Classnam
PostPosted: Sat Nov 11, 2006 10:02 pm 
Beginner
Beginner

Joined: Mon Mar 20, 2006 7:59 am
Posts: 30
Hello,

i am using Beta 2 of NHibernate 1.2.0 in an asp.net application. I have been using Beta 1 without problems - but after updating, some things don't work anymore:

I have a HQLQuery that is like this:
Code:
SELECT new TaskEvaluationData(t.Id, t.Title, t.StartDate, t.EndDate, t.CreationDate,  Count(act), sum(act.PlannedWork), sum(act.PlannedWork), sum(act.PlannedCosts),  sum(act.PlannedCosts))  FROM Task t INNER JOIN t.Actions act  WHERE NOT t.InActive = true   GROUP BY t.Id, t.CreationDate, t.Title, t.StartDate, t.EndDate  ORDER By t.CreationDate


Don't wonder that I have sum(act.PlannedCosts) twice in this query - I overwrite the value later.

The class TaskEvaluationData has this constructor:
Code:
        public TaskEvaluationData(int TaskId, string Title, DateTime? StartDate, DateTime? EndDate,
            DateTime Date, int ActionCount,
            float PlannedWork, float ActualWork, float PlannedCosts,
            float ActualCosts)
            : base(1, 0, PlannedWork, ActualWork, PlannedCosts, ActualCosts)
        {
... }


In Beta 1 everything worked fine, but now this error occures:
Quote:
could not find constructor for: TaskEvaluationData [SELECT new TaskEvaluationData(t.Id, t.Title, t.StartDate, t.EndDate, t.CreationDate, Count(act), sum(act.PlannedWork), sum(act.PlannedWork), sum(act.PlannedCosts), sum(act.PlannedCosts)) FROM AMS.Core.Domain.Task t INNER JOIN t.Actions act WHERE NOT t.InActive = true GROUP BY t.Id, t.CreationDate, t.Title, t.StartDate, t.EndDate ORDER By t.CreationDate]
no appropriate constructor in class: AMS.Core.Evaluation.TaskEvaluationData

The strange thing is, that the constructor is present?!

Is this a beta2 issue or am I doing anything from?

Regards and thanks in advance,
Dominik[/quote]


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 12, 2006 5:59 am 
Beginner
Beginner

Joined: Mon Mar 20, 2006 7:59 am
Posts: 30
I got it - there must have something changed concerning the parameter types. I was using floats all the time, but now I have to use doubles instead.

So after changing all float to double in the respecting data access object, everything works fine again.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.