2 Replies Latest reply on May 15, 2002 1:02 PM by dsundstrom

    creation order of table's columns

    konrad

      is there any way to control the creation order of a table's columns, which are dynamically creating by jboss (when specified to create the table in the jaws.xml file)? in my jaws.xml file, i have 3 cmp fields: id, msg, tstamp, in that order. however, when jboss creates the table for me, the field order is in reverse: tstamp, msg, id. i'm using postgresql and when i do a select * from the table, the id (pk) appears last. it's a small thing, but i'm use to seeing the pk field first. thanks.

        • 1. Re: creation order of table's columns
          jonlees

          I have exactly the same problem using JBoss with Oracle.
          When I auto create a table of about 20 fields, the order appears to be completely randon. The order I specify the fields in the Bean and in the ejb-jar file are consistent and in the order I desire, but the created oder is completely random? If anyone knows why, please let me know (JonLees@Yahoo.com).

          Thanks in advance...

          • 2. Re: creation order of table's columns
            dsundstrom

            No. Column order does not matter, and you should NEVER use select *. If you want you tables created this way, you will have to do it by hand.