[
https://issues.jboss.org/browse/FORGE-501?page=com.atlassian.jira.plugin....
]
Thomas Frühbeck commented on FORGE-501:
---------------------------------------
The current implementation is very consistent and clear regarding the usage of the field
name "id" for the primary key. Although beautiful it mixes three aspects of the
concept of "id": the field name of the primary key, the property name in JPA
queries and the value object in the view.
I shortly evalutated some approaches:
- change the primary key field to "id" independent of the real field name
unfortunately legacy code will break, code generation by reverse engineering will
fail
- use the primary key field throughout the whole application
makes a consistent development view but exposes the inner definitions
- transition from view "id" to the internal real primary key in the managed
bean and el
this seems to be the best solution but causes some "id" vs.
"primaryKey" irritations
Faces scaffold creates compilation errors when "id" getter
is not called "getId()"
----------------------------------------------------------------------------------
Key: FORGE-501
URL:
https://issues.jboss.org/browse/FORGE-501
Project: Forge
Issue Type: Bug
Reporter: Burr Sutter
Assignee: Thomas Frühbeck
Attachments: Actor.java, ActorBean.java
scaffold from-entity ~.model.* --scaffoldType faces --overwrite
generates an ActorBean.java containing
return "view?faces-redirect=true&id=" + this.actor.getId();
when the Actor.java model has the following
@Id
@Column(name = "ACTOR_ID", unique = true, nullable = false)
public short getActorId() {
return this.actorId;
}
public void setActorId(short actorId) {
this.actorId = actorId;
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira