nid, xid, pid
sime - September 4, 2006 - 17:13
| Project: | Timesheet |
| Version: | 4.7.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | sime |
| Status: | active |
Jump to:
Description
Can't add a product. I was going to do the patch but this late at night I can't tell which is correct: "nid" or "xid, pid". Will follow up.
| Attachment | Size |
|---|---|
| nid_xid_pid.gif | 7.72 KB |

#1
That should read: "can't add a project"
#2
Sime,
I'm a little confused as to what you were going to do with nid,xid,pid? Would you like me to write up a little explination of the tables and the keys?
- Earnest
#3
Hi there, sorry about that.
You can see in the image attached that the SQL statement is
insert into timesheet_times(nid, ...however the actual table doesn't have a nid key, it has xid, pid instead.#4
Patch please. :).
#5
Hi Earnest
See OP. It is not clear to me which way it's supposed to be - hence I'm asking.
Also I was discussing this with you on IRC. Why would you suggest I patch this version when it is unclear what additional code you intend to put in your sandbox? :-/
#6
Sime,
I agree. I'm sorry for being delayed again. My hard-drive failed during Drupal-Con :( . So I am without my dev. enviroment for a few days still. But, I will be back in touch soon.
#7
This is still broken.
If you change nid to xid you still get the foreign key error.
#8
The xid is an autogenerated field. To fix this problem, replace nid by pid, it seems to me. The table needs project id, labor id and onsite flag. Iit did work for me, with this change.