Announcement Announcement Module
Collapse
No announcement yet.
Custom Entity attribute names when Reverse Engineering Database? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #3
      Thanks chorrylan, looks like this could be a solution.

      Comment

      Working...
      X