Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » Attribute Names in Generated EJB
Attribute Names in Generated EJB [message #593278] Thu, 15 March 2007 16:57
Shelli is currently offline ShelliFriend
Messages: 6
Registered: July 2009
Junior Member
Hi,

I'm just learning about EJB3 and have downloaded Eclipse v. 3.3.0 with the
latest WTP plugin. I really like the feature to auto-generate EJB entity
classes from a database. However, I have a concern with how some of the
attributes were named. For example, I have a entity "Account" which
references an "AccountType". It's defined like this in the Account class:

@JoinColumn(name = "ACCOUNT_TYPE_ID", referencedColumnName =
"ACCOUNT_TYPE_ID")
@ManyToOne
private AccountType accountTypeId;

Since "accountTypeId" is actually an instance of AccountType, I would
prefer it be named "accountType". Also, the getter/setter methods:

public AccountType getAccountTypeId() {
return this.accountTypeId;
}

public void setAccountTypeId(AccountType accountTypeId) {
this.accountTypeId = accountTypeId;
}


should be called getAccountType/setAccountType. Other than manually
changing this, is there anything I can do to make this happen when the
class is generated? Since I have 41 entity classes that have been
auto-generated, updating them manually would be very labour intensive.

Thanks in advance!
Previous Topic:UML class diagrams of JPA models
Next Topic:Dali Installation
Goto Forum:
  


Current Time: Fri Apr 26 20:52:58 GMT 2024

Powered by FUDForum. Page generated in 0.03368 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top