DataMapper 1.6.0 - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: DataMapper 1.6.0 (/showthread.php?tid=11358) Pages:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
DataMapper 1.6.0 - El Forum - 11-06-2008 [eluser]___seb[/eluser] Ok, thanks for the tip, it guided me to the solve the prob, i removed ->select. ----- in fact i was using select because without an error occured : ------ Code: A Database Error Occurred that's why i use ->select. `*` causes the error (mysql 5.0.51a, mysql 5.0.67 and a version beetween thoses) (xampp for linux packages), SELECT `bookmarks`.* would be better (for that mysql version at least). So I modified the file Codeigniter core file system/database/drivers/mysql/mysql_driver.php Code: function _escape_identifiers($item) I just added Code: if(substr($item,-1,1) == '*') Someone may report the problem ... (I'm too new, and don't know if i had to) DataMapper 1.6.0 - El Forum - 11-06-2008 [eluser]abmcr[/eluser] I am absolutly new with the Data Mapper; my question is: the data mapper is fully compatible with CI 1.7 ? The validation librarie of CI is equal to libray of DM.. Thank you DataMapper 1.6.0 - El Forum - 11-06-2008 [eluser]OverZealous[/eluser] Sorry, that's a new bug introduced between CI 1.7 and DM. stensi - the creator of DM - has been away for a while. I'm sure it will get fixed quickly once he returns. (That's really a bug in CI, if you ask me. It shouldn't escape * on queries.) @abmcr As you can see above, there is a bug between the two projects as of right now, at least using MySQL as the DB. I haven't upgraded my PostGreSQL project yet. DataMapper 1.6.0 - El Forum - 11-08-2008 [eluser]Boyz26[/eluser] Can someone tell me if there is a performance difference between: (1) Code: $b = new Book(); (2) Code: $b = new Book(); I have been struggling to get the rule of thumb when or when not to do a 'new'. Thanks! DataMapper 1.6.0 - El Forum - 11-08-2008 [eluser]OverZealous[/eluser] In the second case, you are unnecessarily creating a new object. DM has to create a new object internally with the $b->category, so you've already created the object. The only reason to duplicate the object like that is if you needed multiple, but different queries with the relationship. And that probably doesn't happen very often. DataMapper 1.6.0 - El Forum - 11-10-2008 [eluser]palZ[/eluser] Download link was down! DataMapper 1.6.0 - El Forum - 11-10-2008 [eluser]Matthew Lanham[/eluser] Hey i'm really loving DataMapper, Got a question regarding relationships... I have a User who has one Pet who has many Tasks which has many Notes Heres my code: Code: //Get the user But it doesn't seem to accept the select statement, is it possible to do this or am i just going mad for no reason? Heres the error: Call to a member function get() on a non-object DataMapper 1.6.0 - El Forum - 11-10-2008 [eluser]Matthew Lanham[/eluser] Ignore the last comment i had put the plural tasks into the has_many on the wedding model.... DataMapper 1.6.0 - El Forum - 11-10-2008 [eluser]OverZealous[/eluser] @Matthew Lanham I can't tell you how many times that has tripped me up! :cheese: DataMapper 1.6.0 - El Forum - 11-10-2008 [eluser]Matthew Lanham[/eluser] @OverZealous.com Pain in the ass eh !!! so simple I've found issues when using WEEK, MONTH, DAY in where statements because its doing pets.WEEK(pets.due) = 45 instead of WEEK(pets.due) = 45, i've put some code in to remedy but might be worth noting for future releases or maybe i am missing something |