I working on ebj3demo articles, all work fine. :-)
When I try to use the Hibernate console, I got two problems!
1) I must use the hibernate-mapping! If I not use the xmls file I not able to view the entities!
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated 20-gen-2006 23.01.01 by Hibernate Tools 3.1.0 beta3 -->
<hibernate-mapping>
<class name="Author" table="author" catalog="jboss">
<id name="authorId" type="integer">
<column name="authorId" />
<generator class="assigned" />
</id>
<property name="name" type="string">
<column name="name" />
</property>
<set name="articles" inverse="true">
<key>
<column name="authorId" />
</key>
<one-to-many class="Article" />
</set>
</class>
</hibernate-mapping>
2) If I put the code in the package org.jboss.ejb3demo an error occour:
Problems while creating sessionfactory
java.lang.NoClassDefFoundError: Author (wrong name: org/jboss/ejb3demo/Author)
but if I put classes in default package all work!
how I correct this?
I want to put the classes in the right package and not in default package!