1 Reply Latest reply on Dec 13, 2001 4:34 AM by michel1

    question abt mapping between field-name & column-name in CMP

    integer

      my table has a field named "mode",and the field in cmp class is also named "mode". i am using sybase sql anywhere 7. "mode" is a keyword in sybase db, so i declare the field in ejb-jar.xml:
      ...
      <cmp-field><field-name>mode</field-name>
      ...
      and in jaws.xml:
      ...
      <cmp-field><field-name>"mode"</field-name></cmp-field>
      ..
      but jboss generated sql,for example :
      insert mytable (...,mode,....) values (....)

      so, what should i do?

        • 1. Re: question abt mapping between field-name & column-name in
          michel1

          Hi,

          the easiest way around this is telling jboss in jaws.xml that the field is named mode2, modeField or _mode or whatever you like.

          If jboss has exclusive access or you can modify all applications having access to the table, the name really is not important (though you might want to read it manually some time).