I use the model in Play like this:
package models;
import java.util.*;
import javax.persistence.*;
import play.db.jpa.*;
@Entity
public class User extends Model {
public String email;
public String password;
public String fullname;
public boolean isAdmin;
public User(String email, String password, String fullname) {
this.email = email;
this.password = password;
this.fullname = fullname;
}
}
Then the table created in Play! fields are sorted alphabetically:
id
email
fullname
isAdmin
password
Is there a way to get it in the correct order?
source
share