date type values in relation table are not set when “add egs
Archived from the Xataface Users forum.
borek — Sun Nov 05, 2006 6:00 am
Hi
I have got a many-to-many relation between tables ‘projects’ and ‘people’ stored in an ‘assignments’ table.
I have defined this relation in table/people/relationships.ini as follows:
[Assignments]
__sql__=”select * from projects, assignments where projects.project_id = assignments.project_id and assignments.person_id = ‘$person_id’”
the assignment table is defined as follows:
CREATE TABLE assignments (
person\_id int(10) signed NOT NULL,
project\_id int(10) signed NOT NULL,
start\_date date,
end\_date date,
PRIMARY KEY (person\_id,project\_id)
)
ENGINE=InnoDB DEFAULT CHARSET=utf8;
The relation tab is displayed correctly and when I use an “add existing assignments record” button, I have the possibility of selecting a project to assign and I can choose dates for the assignment. After saving, the assignment (person_id and project_id) is saved but fields start_date and end_date are set to NULL.
NULL values are set if I write the dates manually e.g. ‘2006-11-11’ or when I use a calendar add-on.
The problem is no showing up id I change the type of ‘start_date’ and ‘end_date’ fields to ?varchar?:
Can anyone help me to solve the problem?
regards
Borek
shannah — Mon Nov 06, 2006 1:19 pm
Thank you for pointing out this bug. I have fixed the issue and added a patch at http://framework.weblite.ca/development/issue-tracker/136
Best regards
Steve
borek — Tue Nov 07, 2006 5:54 am
It does work!
Thanks for quick response.
Borek