-->
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: Uknown Entitiy Class
PostPosted: Fri Apr 28, 2006 12:05 am 
Newbie

Joined: Thu Apr 27, 2006 4:13 am
Posts: 7
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:1.0.2.0

Mapping documents: <?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" namespace="WebApplication2" assembly="WebApplication2">
<class table="class" lazy="true">
<id name="Classid" column="classID" type="Int32" unsaved-value="0">
<generator class="assigned" />
</id>
<property column="name" type="String" name="Name" length="10" />
</class>
</hibernate-mapping>

Code between sessionFactory.openSession() and session.close():ISessionFactory sessionFactory = config.BuildSessionFactory();
ISession session = sessionFactory.OpenSession();
Class newClass = new Class();
newClass.Classid=1;//Int16.Parse(isbnTextBox.Text);
newClass.Name = "hey";
session.Save(newClass);
session.Flush();

Full stack trace of any exception that occurs:

Name and version of the database you are using:sql server2000

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:

[quote] my code works compeletly true in a windows application. all classes are known and all mapping files works true. but i can not go progress in a web application, in first step, i see this error messege "unkown Class entity: . . ."
I can not find the problem reason ! Is there any body hwo can help me.
if possible, send me a true code with c#.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 28, 2006 12:09 am 
Expert
Expert

Joined: Fri May 13, 2005 5:56 pm
Posts: 308
Location: Santa Barbara, California, USA
class is missing the class name:

Code:
<class name="Class" table="class" lazy="true">


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.