Aakash Joshi
Aakash Joshi

Reputation: 147

Column order in SugarORM

I have Model class as follows :

public class Form_Model extends SugarRecord {
            String date, district,municipality,ward;
            int f1q1, f1q2, f1q3, f1q4, f1q5, f1q6;
            String f1q7, f1q8, f1q9;
            .....
            ..... 
}

And constructor as :

 public Form_Model(String date, String district, String municipality, String ward, int f1q1, int f1q2, int f1q3, int f1q4.....)

Everything works fine. But upon looking at the generated .db file, the columns are in random order (not as specified in constructor).What should be done to get the columns in order as that of the constructor or in the order I want ?

EDIT : Just found out that SugarORM orders the columns in alphabetical order. So, anyway to override that?

Upvotes: 0

Views: 43

Answers (1)

Sermanes
Sermanes

Reputation: 506

You can create the database with sql if you prefer Do the next

Upvotes: 1

Related Questions