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 #434347] Thu, 15 March 2007 12:57 Go to previous message
Shelli is currently offline Shelli
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!
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:Attribute Names in Generated EJB
Next Topic:Dali Installation
Goto Forum:
  


Current Time: Mon May 20 04:45:10 EDT 2013

Powered by FUDForum. Page generated in 0.05699 seconds