I apologise, I was wrong about the hibernate.cfg.xml. I got this working with JPA annotations. Your hibernate.cfg.xml needs to contains something like:
Code:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
'-//Hibernate/Hibernate Configuration DTD 3.0//EN'
'http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd'>
<hibernate-configuration>
<session-factory>
<mapping package='com.scrumtious.repository' />
<mapping class='com.scrumtious.repository.Defect' />
</session-factory>
</hibernate-configuration>
You then need to pass the full name of the domain class to generate-controller:
grails generate-controller com.scrumtious.repository.Defect
Hope that helps.