When reading the docs for MiddleKit, it appears like
there is support for types like: [list of ClassName],
providing a one to many mapping. However, when I
tried this, the result is both not what I was
expecting, and seemingly not complete.
As an example, I was trying to update UserKit to
support roles. In my understanding, a User could have
ex: User Bill -> [Administrator, Author, Editor]
In the classes.csv file, I then put:
roles, list of Roles as the field name and type
What I was expecting to happen was that middlekit
would create the roles field, and manage the list as a
varchar type, translating the object references from a
python list of Roles to a comma seperated string of
What appeared to happen was that no field gets created
in the user table, but the middlekit machinery expects
there to be a reference to userId in the Role table
(which never got created). If that is how the
database was created, we would have a much different
object reference structure with each role belonging to
only one user -- this is certainly not the desired
What is the resolution:
- is my understanding incorrect?
- does middlekit need to be updated to support this?
- should I manually be building the list of
references (from say a UserRole table that allows for
a mapping between userId's and roleId's?)
Do you Yahoo!?
HotJobs - Search new jobs daily now