title: How can I make Fanbatis @Column annotation to map Fantom class attribute to DB column correctly?
body: <p>I'm using Fanbatis framework to access a MySQL database. The documentation here: <a href="http://www.talesframework.org/fanbatis/" rel="nofollow">http://www.talesframework.org/fanbatis/</a> says that I can use the @Column annotation to map a class attribute to a column with a different name:</p>
  
  <pre><code>@Column{name="xx"} - By default column name is assumed to be the field name, 
                       to change this use this annotation on a field 
  </code></pre>
  
  <p>I have this class...</p>
  
  <pre><code>using fanbatis
  
  @Table {name = "APPS"}
  class App
  {
    @Primary 
    Str? id
    Str? name
    @Column{name="description"}
    Str? descr
  }
  </code></pre>
  
  <p>And the APPS table created with this SQL:</p>
  
  <pre><code>create table APPS (
      ID              varchar(36)     not null,
      NAME            varchar(100)    not null,
      DESCRIPTION     varchar(400)    ,
      primary key (ID)
  );
  </code></pre>
  
  <p>And I'm trying to retrieve a record from the database using this DAO</p>
  
  <pre><code>class AppDao
  {
    static App? findById(Str id)
    {
      S&lt;|
        select * from apps where id = #{id}
      |&gt;
    }
  }
  </code></pre>
  
  <p>My code compiles fine, but when I run it, passing in the ID of an existing record, it retrieves the record from the database and set the values of the attributes that match the column names, but the app.descr remains null. However, if I just remove the @Column annotation from the "descr" attribute and rename it to match the column ("description"), then the code runs fine and returns the expected values.</p>
  
  <pre>
  -- Run:  auth::TestAppDao.testFindById...
  Test setup!
  app.id: 0615a6cb-7bda-cc40-a274-00130281bd51
  app.name: MyApp
  app.descr: null
  
  TEST FAILED
  sys::TestErr: Test failed: null != "MyApp descr" [sys::Str]
    fan.sys.Test.err (Test.java:206)
    fan.sys.Test.fail (Test.java:198)
    fan.sys.Test.verifyEq (Test.java:121)
    fan.sys.Test.verifyEq (Test.java:90)
    auth::TestAppDao.testFindById (TestAppDao.fan:36)
    java.lang.reflect.Method.invoke (Unknown)
    fan.sys.Method.invoke (Method.java:559)
    fan.sys.Method$MethodFunc.callList (Method.java:204)
    fan.sys.Method.callList (Method.java:138)
    fanx.tools.Fant.runTest (Fant.java:191)
    fanx.tools.Fant.test (Fant.java:110)
    fanx.tools.Fant.test (Fant.java:32)
    fanx.tools.Fant.run (Fant.java:284)
    fanx.tools.Fant.main (Fant.java:327)
  Test teardown!
  </pre>
  
  <p>Am I doing something wrong or is this a bug in Fanbatis?</p>