-->
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 when calling AddAssembly method
PostPosted: Sat Feb 25, 2006 10:22 am 
Regular
Regular

Joined: Sun Feb 12, 2006 10:18 pm
Posts: 60
Location: Rosario, Argentina
I'm trying to test my code, I've (auto) generated all my classes an hbm files. So in form_load event I wrote this code:

Code:
private void Form1_Load(object sender, EventArgs e)
{

    Configuration conf = new Configuration();
    //conf.AddAssembly("ReglasPrestamos");
    conf.AddAssembly(typeof(ReglasPrestamos.Aviso).Assembly);
    ISessionFactory sessions = conf.BuildSessionFactory();
    ISession session = sessions.OpenSession();

    cboPais.DisplayMember = "Descripcion";
    cboPais.ValueMember = "Id";
    cboPais.DataSource = session.CreateCriteria(typeof(ReglasPrestamos.Provincia)).List();

    session.Close();

}

but when I get to the line

conf.AddAssembly(typeof(ReglasPrestamos.Aviso).Assembly);

I get this exception:

"The 'default-lazy' attribute is not declared."

So, where should I declare that attribute?? I can't even find in source code where it's looked for...

help me... please...


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 25, 2006 11:11 am 
Regular
Regular

Joined: Sun Feb 12, 2006 10:18 pm
Posts: 60
Location: Rosario, Argentina
Never mind... I just found out the problem: I migrated hibernate hbm files to nhibernate hbm files and they are not exactly the same... I knew that, but I just foud out that the DOCTYPE section had to be removed, otherwise... it looks for hibernate properties!


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.