-
Notifications
You must be signed in to change notification settings - Fork 162
Scaffolding Design Notes
-
Entity-level attributes
MetaWidget does not have any way to inspect and assign attributes at the entity level. This is possible only at the property level. Hence, it is difficult to discern if a type has a method on it or not, and then adjust widget creation. For example, when displaying h:selectOneMenu items in the Faces scaffold, the presence of the toString() method cannot be determined, thus forcing the choice of using toString() or the primary key Ids to be taken at runtime. See FORGE-873 for more details.
-
Injection of dependencies into Metawidget components
Injection of dependencies into InspectionResultProcessors etc. would be desirable. This would allow the Forge 1.x Shell and ShellPrompts to be injected into such classes so that user-inputs can guide the generation of the scaffolds. At the moment, the complete Metawidget pipeline is not used due to this reason.
This table outlines the JPA annotations that are supported (or not supported).
JPA Annotation | Faces scaffolding | HTML5 scaffolding |
---|---|---|
Identity |
||
@Id |
||
@GeneratedValue |
||
@EmbeddedId |
||
@IdClass |
||
Columns |
||
@Basic |
||
@Embeddable |
||
@Embedded |
||
@Column |
||
@Temporal |
||
@Transient |
||
@Version |
||
@Lob |
||
Associations |
||
@OneToOne |
||
@OneToMany |
||
@ManyToOne |
||
@ManyToMany |
||
@MappedSuperclass |
||
@Inheritance |
||
@DiscriminatorColumn |
||
@DiscriminatorValue |
||
@AssociationOverride |
||
@AssociationOverrides |
||
@JoinColumn |
||
@JoinColumns |
||
@PrimaryKeyJoinColumn |
||
@PrimaryKeyJoinColumns |