allcount / allcountjs

Rapid application development framework for Node.js
http://allcountjs.com
MIT License
402 stars 83 forks source link

js error when using relation reference #136

Open fxp opened 8 years ago

fxp commented 8 years ago

I'm trying to build a minimized version of allcountjs with 2 models: Teacher and Student.

        Student: {
            fields: function (Fields) { return {
                name: Fields.text("名字").required(),
                tutor: Fields.reference('Tutor', 'Teacher')
            }}
        },
        Teacher: {
            fields: function (Fields) { return {
                name: Fields.text("名字").required(),
                myStudents: Fields.relation('My students', 'Student', 'tutor')
            }}
        }

But I got this error when I tried to select a teacher as tutor in Student Add page /entity/Student/new

select2.js:356Uncaught TypeError: Cannot read property 'toUpperCase' of undefined