Part of the EllisLab Network
   
3 of 80
3
[Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition)
Posted: 04 May 2009 01:18 PM   [ Ignore ]   [ # 21 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1041
Joined  10-08-2008

New Version:
I updated DataMapper to 1.2.1.  This includes 2 fixes.  First, I fixed the above-mentioned join_related() bug.

Second, I also discovered that save_<related_field>() was not returning TRUE or FALSE.

Please download the file attached to the first post, and replace your current datamapper.php.

 Signature 

Phil DeJarnett
  OverZealous Creations, LLC

Profile
 
 
Posted: 04 May 2009 01:21 PM   [ Ignore ]   [ # 22 ]  
Lab Assistant
RankRank
Total Posts:  200
Joined  04-02-2009

@MeanStudios:
I know OverZealous has already reported your problem as a bug… but why are you using plurals and singulars in your models?? you have Class User and Class News…. I prefer to use singular cause that way I dont have to specify the name of the table.

Profile
 
 
Posted: 04 May 2009 01:23 PM   [ Ignore ]   [ # 23 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1041
Joined  10-08-2008

@NachoF
Don’t forget “News” is singular when referring to “the news”, like in newspapers.

wink

 Signature 

Phil DeJarnett
  OverZealous Creations, LLC

Profile
 
 
Posted: 04 May 2009 02:02 PM   [ Ignore ]   [ # 24 ]  
Lab Assistant
RankRank
Total Posts:  200
Joined  04-02-2009
OverZealous.com - 04 May 2009 05:23 PM

@NachoF
Don’t forget “News” is singular when referring to “the news”, like in newspapers.

wink

Oh, I see… so in theory there would be no need to specify the name of the table, right>?

Profile
 
 
Posted: 04 May 2009 02:09 PM   [ Ignore ]   [ # 25 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1041
Joined  10-08-2008

Well, I’m not saying it wouldn’t cause problems (it might), just pointing out that news is singular and plural, like moose or deer.

That being said, having the model and table both named “news” should work.  I’ve just never tested it.

 Signature 

Phil DeJarnett
  OverZealous Creations, LLC

Profile
 
 
Posted: 04 May 2009 05:29 PM   [ Ignore ]   [ # 26 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  417
Joined  11-17-2008

@OverZealous
*whew* I thought I was doing something wrong haha.  Thanks for fixing it so quickly!!
Yup, don’t think there is a singular word for news smile.  Maybe newsi? hehe

 Signature 

- cody

Plugins: AJAX Pagination | AJAX Comments
Extensions: jQuery Quick Save (updated) | Goto Latest Comment
FieldTypes: MS Img Saver
MeanStudios.com

Profile
 
 
Posted: 04 May 2009 05:43 PM   [ Ignore ]   [ # 27 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  417
Joined  11-17-2008

Found another bug heh

SELECT `news`.`*`, `users`.`id` AS user_id, `users`.`username` AS user_username FROM (`news`) LEFT JOIN `users` as users ON `users`.`id` = `news`.`user_id

Using the same code as above it’s producing that query and it’s saying, “Unknown column ‘news.*’ in ‘field list’” because it’s escaping the ‘*’.  It should be:

SELECT `news`.* 

I’m trying to find out where it’s doing that in the code but I don’t have much time to dedicate toward that hmmm.

 Signature 

- cody

Plugins: AJAX Pagination | AJAX Comments
Extensions: jQuery Quick Save (updated) | Goto Latest Comment
FieldTypes: MS Img Saver
MeanStudios.com

Profile
 
 
Posted: 04 May 2009 06:17 PM   [ Ignore ]   [ # 28 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1041
Joined  10-08-2008

@MeanStudios
http://stensi.com/datamapper/pages/troubleshooting.html

 Signature 

Phil DeJarnett
  OverZealous Creations, LLC

Profile
 
 
Posted: 04 May 2009 06:29 PM   [ Ignore ]   [ # 29 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  417
Joined  11-17-2008

Oops, sorry I missed that ><.
I could have swore I downloaded the latest CI 1.7.1…..weird.

Thanks smile

 Signature 

- cody

Plugins: AJAX Pagination | AJAX Comments
Extensions: jQuery Quick Save (updated) | Goto Latest Comment
FieldTypes: MS Img Saver
MeanStudios.com

Profile
 
 
Posted: 05 May 2009 05:02 PM   [ Ignore ]   [ # 30 ]  
Lab Assistant
RankRank
Total Posts:  200
Joined  04-02-2009

I have to say datamapper and dmz really are great…. they should be built in into CI so that peole can create other plugins based on it….. I got into this discussion at the iScaffold thread cause I figured it makes no sense that if I want to use their CRUD app I cant because their queries will be based on a different kind of model than the Datamapper model… if CI was more standardized then I wouldnt have to make the decision between using Datamapper and using iScaffold, which is stupid.

Profile
 
 
   
3 of 80
3