title: Grails 2.3.4 Database View as Domain Class
body: <p>I am trying to use database view as domain class, following steps from Burt Beckwith slide.</p>
  
  <p><a href="http://www.slideshare.net/gr8conf/gorm-burt-beckwith2011" rel="nofollow">http://www.slideshare.net/gr8conf/gorm-burt-beckwith2011</a></p>
  
  <p>I have defined the config class:</p>
  
  <pre><code>configClass = 'sfgroups.DdlFilterConfiguration'
  </code></pre>
  
  <p>package sfgroups</p>
  
  <pre><code>import org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsAnnotationConfiguration
  
  class DdlFilterConfiguration extends GrailsAnnotationConfiguration  {
      private static final String[] IGNORED_NAMES={"v_fullname"}
  
      private boolean isIgnored(String command){
          command=command.toLowerCase()
  
          for( String table : IGNORED_NAMES ){
              if( command.startsWith("create table " + table + " ") ||
                  command.startsWith("alter table " + table + " ") ||
                  command.startsWith("drop table " + table + " ") ||
                  command.startsWith("drop table if exists " + table + " ")   ){
                  return true
              }
          }
          return false
      }
  
  }
  </code></pre>
  
  <p>Domain class</p>
  
  <pre><code>package com.sfg
  
  class FullName {
  
      String firstname
      String lastname
  
      static mapping = {
          table = 'v_fullname'     
      }
  }
  </code></pre>
  
  <p>When I run the application its giving this error message.</p>
  
  <pre><code> ERROR context.GrailsContextLoader  - Error initializing the application: Error evaluating ORM mappings block for domain [com.sfg.FullName]:  No such property: table for class: org.codehaus.groovy.grails.orm.hibernate.cfg.HibernateMappingBuilder
  Message: Error evaluating ORM mappings block for domain [com.sfg.FullName]:  No such property: table for class: org.codehaus.groovy.grails.orm.hibernate.cfg.HibernateMappingBuilder
  </code></pre>
  
  <p>how can I fix this startup error?</p>
  
  <p>Thanks</p>