![]() |
[Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - 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: [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) (/showthread.php?tid=18196) |
[Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 07-26-2009 [eluser]OverZealous[/eluser] Thank you! I'm currently working on replacing all of the example code with properly formatted and styled code. It wrote a little utility that automatically colors PHP functions, DMZ functions, DMZ methods, and extension methods. It works really well so far, and makes the examples much easier. [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 07-26-2009 [eluser]bEz[/eluser] @phil Code: A PHP Error was encountered This error is produced as a result of: Code: $form_fields = array('id', What is the resolution? Below is the validation definition from the model. Code: var $validation = array( [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 07-27-2009 [eluser]Ninja[/eluser] Thanx OverZealous Wow you really great with this, lol Can i get you on speed dial? (just kidding) Got it working but just took out the 'IS NULL' because it was throwing a database error. Like it didnt recognize IS NULL (Im using postgreSQL) But this is how i got it working and didnt need to instantiate client: Code: $comp = new Company(); Thanx again been stuck with this problem for a week now. Glad its finally sorted and it was so simple. Silly on my part trying the long way around. [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 07-27-2009 [eluser]OverZealous[/eluser] Are 'zone' and 'pool_team' related items? (As opposed to being stored on the model directly.) If so, then that's the issue. The hidden input type isn't really designed to handle relationships. Just normal, single values. Only inputs that can have an array of possible values (dropdown, checkbox, and radio) can be used with relationship fields. Why would you pass a related value in a hidden field, anyway? If you have a good reason to pass that kind of information, then you can create your own input method helper. Instructions are in the docs. [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 07-27-2009 [eluser]OverZealous[/eluser] Officially Released: Quote:Version 1.4.0: The Big Update! For those who are interested: • I have (I think) updated every single HTML file in the manual, with style changes, modifications, or all new content. • I have made 156 commits (from rev 33 to rev 189 in my SVN repo) for this update. • There are 8268 lines of PHP code in the distribution, with 1535 lines in extensions, and 1883 lines in the example app. (Simple line count, including blank lines.) • I wrote a custom script to read chunks of PHP code, run it through highlight_string, and then heavily process it to auto-color DataMapper methods (and built-in PHP methods). Quote:Download the Latest Version Here [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 07-27-2009 [eluser]bEz[/eluser] [quote author="OverZealous.com" date="1248698923"]Are 'zone' and 'pool_team' related items? (As opposed to being stored on the model directly.)[/quote] No, they are not "traditional" join table related. I will use "jt's" on a case-by-case basis. [quote author="OverZealous.com" date="1248698923"]If so, then that's the issue. The hidden input type isn't really designed to handle relationships. Just normal, single values. Only inputs that can have an array of possible values (dropdown, checkbox, and radio) can be used with relationship fields.[/quote] Oh, well... In testing I disabled the "htmlspecialchars" function on line 715 and that resolved the error, but I will refrain from hacking the library. [quote author="OverZealous.com" date="1248698923"]Why would you pass a related value in a hidden field, anyway? If you have a good reason to pass that kind of information, then you can create your own input method helper. Instructions are in the docs.[/quote] Basically, the two hidden are used because the id's are "PRE-DETERMINED" from a previous screen (via anchor tag) when CREATING A NEW ROW. A tiered managment page. For EDITING, I will not be using it as a hidden value because at that point, I may want to change the zone and/or pool_team as needed. Say a collegiate player needs to become a free agent, pro player, etc. BTW, I see dmz went GOLD! maybe for the next release, you can add this tidbit about use of "hidden" to the docs (if not already updated). p.s. :: DEEP RELATIONSHIPS, omg that feature is about to get abused. Better be ready for ways in which to optimize it if need be... :coolgrin: [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 07-27-2009 [eluser]bEz[/eluser] @phil Was looking at the help page for the login_manager (which I only used via testing example app). Is there a typo with the $params vs $param variables used in the constructor? Code: function __construct($params = array()) [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 07-27-2009 [eluser]bEz[/eluser] @phil excerpt from dmz 1.4.0 manual. Quote:Custom Types In the example code, $object is being passed for what purpose? Is it in case you need to use it? Don't see any magical way... 8-/ btw, I have created my custom type as input_hidepreset [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 07-27-2009 [eluser]OverZealous[/eluser] @bEz Yes, that's a typo in the example app. The example app might be full of little mistakes like that :roll: -- The input-generation functions all receive the $object. That is entirely on purpose. It allows the input function to modify what it generates based on the $object being worked on. If I didn't pass it, you couldn't read other fields on the object. For example, maybe I want to generate an AJAX control that looked up items in an on-the-fly drop-down. I might need to send the ID and Model of the object back to the server for that. -- I did make a note that the related items can only work with dropdown, checkbox, and radio in the lastest release. I might modify it for the next release, to allow hidden for single-input types. There might also be a bug, I don't know, I just haven't had time to look into that one. Have fun breaking the new features. I might not be able to respond very quickly during the rest of this week. [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 07-27-2009 [eluser]Dartmien[/eluser] Hey guys, Im new to the datamapper and Im having problems to execute a simple query... Here is my model Code: class Message extends DataMapper I am calling that from my controller this way: Code: function test(){ That should return 4 ids from my database but it returns only the id from the last row... But if i remove the "select("receiver_id")" i get all rows i wanted... What am I missing here? Thanks in advance |