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:Attribute Names in Generated EJB
Goto Forum:
  


Current Time: Thu Dec 18 08:38:40 GMT 2014

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

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