![]() |
[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 - 09-29-2009 [eluser]bEz[/eluser] @phil Quote:Yeah, although untested, you can see I have yet to shorten my coding with the updated constructor method. @Jinkusu Quote:Glad you got it resolved, I'm just helping out where I can. I'm not a guru with DMz ( yet -bEz [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 09-29-2009 [eluser]OverZealous[/eluser] @bEz One thing I'm trying to avoid is including any sort of JavaScript with DMZ. AJAX methods, by definition, require JavaScript. But there are dozens of decent-to-good JS libraries out there. For example, I use Dojo Toolkit, because it includes a phenomenal widget library and base for creating your own widgets. However, I have used Prototype and jQuery in the past. Many others use YUI, or Google's library. All are decent, but they also all require significantly different approaches for writing your JS code, even as basic as how you structure your objects and manipulate the DOM. I do, however, include an extension for converting objects into JSON. You can also use the Array extension combined with json_encode for the same thing. That's part of the AJAX equation. Well, part of the AJAJ equation, at any rate! [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 09-29-2009 [eluser]bEz[/eluser] Oh, I have already realized that my only bridge to JQuery is the use of JSON encoding/decoding methods. :cheese: I was just looking at ways in which to enhance the htmlform extension. I have peaked at a few of the blog libraries which use AJAX in the control panel coding. [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 09-30-2009 [eluser]KSiimson[/eluser] Can I join a table which has a primary index that is not "id" and is not numerical? I would like to use a database table that is being used by other applications, so changing the primary index would break those apps. My guess is that "other_field" can be used for that. But I am not sure how would the join table look then? Edit: Sorry, I think I found the appropriate documentation for that here. [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 09-30-2009 [eluser]Jinkusu[/eluser] Hail guys, is their anyway to restrict a query to the records already loaded in an object? Code: $enrollments->where_related_student($student)->get(); The problem is that instead of the second query being limited to the results of the first it queries the entire DB and only return the results of the second. [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 09-30-2009 [eluser]OverZealous[/eluser] [quote author="KSiimson" date="1254361515"]Can I join a table which has a primary index that is not "id" and is not numerical? I would like to use a database table that is being used by other applications, so changing the primary index would break those apps.[/quote] No, you cannot do this. Every DataMapper item must have a unique, auto-generated numerical ID. The closest you can get to what you had before is to add an extra, DMZ primary key, and use your non-numerical ID as a different UNIQUEly indexed column. The document you linked to is about managing complex relationships, but you still must use numerical indexes. [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 09-30-2009 [eluser]OverZealous[/eluser] [quote author="Jinkusu" date="1254368635"]is their anyway to restrict a query to the records already loaded in an object?[/quote] You'll need to create an array of all IDs already loaded, and use where_in_related. [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 10-05-2009 [eluser]Jeffrey Lasut[/eluser] @OVerZealous Properly the 10.000th time you’re declared godlike, but still I’m going to do it again: It’s an awesome library. I’ve been searching the form but couldn’t find a answer tot fowling question: Is there a way to extend a model class, I don’t mean Model to MY_Model but a Model that inherits the functions of another one. Example: Code: class Node extends DataMapper { Thanks in advanced. Jeffrey [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 10-05-2009 [eluser]Jinkusu[/eluser] @Jeffrey Lasut Quote:Is there a way to extend a model class, I don’t mean Model to MY_Model but a Model that inherits the functions of another one. Could this be what your looking for, its not DMZ, its Datamapper, the first generation somewhat. [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 10-05-2009 [eluser]Jeffrey Lasut[/eluser] @Jinkusu Thanks for the reply, the link you send looks promising. Going to the gym right now, when I return I'll take a look at it. |