1 Reply Latest reply on Apr 24, 2007 12:44 PM by maxandersen

    Seam-gen Entity name generation question

      Hi,

      Maybe this was already answered, but I couldn't find it:
      I have a DB schema, where tables have a prefix, to identify them as belonging to a module:

      md_*
      msg_*

      If I use seam-gen, out of the box, I get entities (and all the other java, xhtml files) like this:
      Md*
      Msg*

      Can this be avoided? Can you specify somewhere that you want to ignore the prefix when generating the code? Or transform the prefix into a package? I found on the net an article about the way you can generate the table/column names for hibernate but that involved creating your own Java class. Maybe here it's easier to do this, from a config file?

        • 1. Re: Seam-gen Entity name generation question
          maxandersen

          seamgen currently only enable the usage of reveng.xml where you can explicit list the names wanted for tables/columns.

          You can patch your version of seam-gen to use a custom reverse engineering strategy if you want finer control over it.

          See the docs for hibernate tools on how to do this.