6 Replies Latest reply on Dec 10, 2009 12:38 PM by jamiemckenzie

    FB4b1: Datagrid with data driven Combobox

    ma.tze Level 1

      Hi,

       

      I created a datagrid with a datadriven combox in FB4b1.

      The database stores "only" values (dbColumn as int), but shows a different labeltext in the grid (comboColumn as string).

      I created a solution with two columns ( the dbColumn is hidden), that works, but I have the following situation:

       

      1a.) If I do not create the comboColumn in my Database, I am getting the following error message:

       

       

      Unable to invoke a fill operation on destination 'Projectname.Entity' due to the following error: class java.lang.RuntimeException:Hibernate jdbc exception on operation=fill error=could not execute query : sqlError =  from SQLException: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown column 'entity0_.comboColumn' in 'field list'.

       

      1b.) If I add the comboColumn only in my model ( not in my databse)

                ...

              <property name="comboColumn" type="string"/>
          </entity>

       

      I am getting the same error message. (1a.)

       

      If the comboColumn is not part of my entity, I can not use the autogenerated services!?

       

      How can I tell Fiber that this column exists but not for saving?

       

      2.) If I created the comboColumn in my Database, everything works fine, but  I have redundant informations.

      (dbColumn and comboColumn having the same informations as int/string)

       

      How can I solve this?

       

      Any pointers very welcome!

       

      Martin Zach