Results 1 to 3 of 3

Thread: Custom Entity attribute names when Reverse Engineering Database?

Hybrid View

  1. #1
    Join Date
    Dec 2011
    Posts
    14

    Default Custom Entity attribute names when Reverse Engineering Database?

    Wondering if there is a way this can be accomplished with an existing config mechanism, or a adjustment of the dbre command...

    Lets say I have an Employee table in our database, and using our naming conventions for column names we have the following columns...

    - EmployeeID
    - EmployeeFirstName
    - EmployeeLastName

    By default, when i dbre this table, it will give me the following attributes of the entity...

    - employeeId
    - employeeFirstName
    - employeeLastName

    So by default when i want to grab the employee id i have to reference it as employee.employeeId, and so on for the other attributes.

    Preferably, I would like to be able to use employee.id instead.

    Is there a way to have the dbre generate the following attribute names, without changing the column names in the table?

    - id
    - firstName
    - lastName

    Thanks,

  2. #2
    Join Date
    Jan 2007
    Posts
    18

    Default

    Quote Originally Posted by iojohnso View Post
    Is there a way to have the dbre generate the following attribute names, without changing the column names in the table?
    Check out https://jira.springsource.org/browse/ROO-2911
    I was able to extend DBRE to allow remapping of table/entity names using regex and/or a groovy script and it might be possible to do something similar with column names

  3. #3
    Join Date
    Dec 2011
    Posts
    14

    Default

    Thanks chorrylan, looks like this could be a solution.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •