ok after a good night sleep i discovered that my xml files were not written to WEB-INF/classes (eclipse does not build them so the are not updated)
so after copying them over to WEB-INF/classes the below solution works fine!

to make things sure i set hibernate sql to debug and run
mvn clean jetty:run-war

result:
DEBUG [btpool0-2] SQL.log(393) | select roles0_.user_id as user1_1_, roles0_.role_id as role2_1_, role1_.id as id0_0_, role1_.name as name0_0_, role1_.description as descript3_0_0_ from user_role roles0_ left outer join app_role role1_ on roles0_.role_id=role1_.id where roles0_.user_id=?

you see i use the app_role table!

annnddd my cobertura report works again.... shit 13% coverage.,... there is work todo ;)

have fun

tibi

tibi wrote:
i'm looking into overwriting the entity settings of the role object*


i have changed the hibernate.cfg.xml to:
<hibernate-configuration>
   <session-factory>
       <mapping class="org.appfuse.model.User"/>
       <mapping resource="role.hbm.xml"/>
   </session-factory>
</hibernate-configuration>

and i made the role.hbm.xml:

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
       "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
       "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd";>
<hibernate-mapping>

   <class  name="org.appfuse.model.Role" table="app_role">
       <id name="id" column="id">
           <generator class="native"/>
       </id>
       <property name="name"/>
       <property name="description"/>
   </class>
</hibernate-mapping>


hibernate takes the file (it complains when it is not correct) but the app_role table is not used.
instead the role table is used.

i will dive in deeper later but maybe someone has a brilliant idea? ;-)



ciao.

tibi




*why? because i want a different table name. i can add the class to my project like this:
http://appfuse.org/display/APF/AppFuse+Core+Classes
but then copertura will not work any more. and i end op with classes in my project which i don;t need.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to