Skip to content

Scaffolding Design Notes

Vineet Reynolds edited this page Jul 23, 2013 · 8 revisions

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.

JPA support matrix for scaffolding

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