PDA

View Full Version : [OPEN] Feature request: Generate models from entities or classes



bartyhoho
4 Nov 2015, 10:26 AM
I saw the demo of the plugin at the DC roadshow yesterday, and one feature request I'd like to make is the ability to generate the Ext models from the backend classes or entities. Especially after seeing the grid columns generated from the model.

Chris.OBrien
5 Nov 2015, 7:35 AM
Thanks for the new feature request! I have opened a ticket in our tracker for future consideration.

Chris.OBrien
23 Nov 2015, 7:25 AM
I saw the demo of the plugin at the DC roadshow yesterday, and one feature request I'd like to make is the ability to generate the Ext models from the backend classes or entities. Especially after seeing the grid columns generated from the model.

When you say "backend classes or entities" can you give more details with what you mean? Do you have a Java backend with ORM or JDBC entities? Thanks.

bartyhoho
24 Nov 2015, 3:52 PM
When you say "backend classes or entities" can you give more details with what you mean? Do you have a Java backend with ORM or JDBC entities? Thanks.

Yes, I have a Java backend using JPA. The following is a sample entity that is mapped to a database table:


@JsonIdentityInfo(generator=ObjectIdGenerators.PropertyGenerator.class,property="id")
@Entity
@Table(name="XXX_user")
public class User implements Serializable {
private static final long serialVersionUID = 9006147900525671337L;

@Id
@Column(name = "USER_ID")
private long id;

@Column(name = "USERNAME", length = 60, unique = true, nullable = false)
private String username;
}


But the intent of my comment was more general: I'd like to generate Ext models from any POJO or similar class. Maybe something like right-click on a package and have the plugin generate models from every class in the package.