![]() |
[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 - 10-08-2009 [eluser]Jeffrey Lasut[/eluser] hehe ![]() English is not my native language, so expect some typos in the near future ![]() [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 10-08-2009 [eluser]bEz[/eluser] [quote author="OverZealous" date="1255006305"]... I was going to write a rap about D-M-Z's complex-i-ty. :lol:[/quote] Wow! Phil's extending his range of abilities to entertainment now. Quote:I hope you perform better than "Calhoun Tubbs" from In Living Color" [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 10-09-2009 [eluser]tomdelonge[/eluser] So I've got a simple little store I'm making. I want categories to be able to have categories. I really feel like this code is too cluttered and I'm not sure if It's the best way to do it. So the url would look like this: categories/view/5 10 products at a time should show up on a page. Here's my questions: 1) Should I clone an object (or even create a new one) just to find the current category? What's a better way? 2) Am I even getting the categories in the best ways (best sql queries?) I'm not going to be caching pages, so I want the best possible queries. 3) with the pagination, do I really need to do a whole other query just to find if another page is possible? Basically, give me any suggestions that you have. Thanks. (This is my first project with dmz, if you can't tell from my code). each product has_one category each category has_many products Code: function view($id = NULL) [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 10-10-2009 [eluser]Monotoba[/eluser] Hi folks, I'm needing a little help. I am trying to use DMZ with a CI-CMS. My issue is that CI-CMS uses a table prefix of 'ci_' and I would like to use table prefixes in my module that is using DMZ. If I set prefixes in the config.php file the DMZ related queries refere to the same tables in two different ways. First, using the DMZ prefix and then using the DMZ and CI prefix (concantinated) as in 'ci_ci_<tablename>'. Is there anyway to get DMZ or DataMapper to work with CI table prefixes? Thanks for the help [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 10-10-2009 [eluser]OverZealous[/eluser] @Monotoba Please read the documentation. [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 10-11-2009 [eluser]storkontheroof[/eluser] Hi, This is my first project using DMZ and i must say i really like it. Thanks for this product!! I've got a question about saving an object though. Note: I have set $db['db_debug'] to FALSE. When my object validates, but there is some sort of DB error, DMZ returns TRUE even when the the transaction status ($this->db>trans_status()) is FALSE. I noticed the following lines in the save method of the datamapper library (around line 1003): Code: // Create new record Why isn't the last line like this: Code: $result[] = $this->db->trans_status(); Am i misunderstanding something?? Hope to hear from you. Regards, Richard [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 10-11-2009 [eluser]OverZealous[/eluser] Hi storkontheroof, It looks like that might make more sense, I'll have to look into it when I get more time. However, DMZ handles validation almost exclusively within PHP (obviously, in real life, the DB needs to check as well). The result of save() and the related methods is more about whether or not the validation succeeded. If your validation is configured correctly, it should be pretty rare that you have a DB error. [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 10-11-2009 [eluser]storkontheroof[/eluser] Hi Phil, Thanks for your reply and you're right: with validation configured correctly, DB errors will be rare. Regards, Richard [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 10-16-2009 [eluser]ennis[/eluser] Hi guys, I have successfully used has_one and many now brilliant! But i have run into a problem my clients_users works fint as in the users table is now related to the clients table vise versa though clients_users ( id, client_id , user_id ) I have dont the same for my tickets table and related them to clients since a client can have many tickets via the table clients_tickets(id,client_id,ticket_id) all the clients users and tickets tables start with column id etc. as it says in the manuel I get this error DataMapper Error: 'client' is not a valid parent relationship for Ticket. Are your relationships configured correctly? My model Code: class Client extends DataMapper { any ideas? [Deprecated] DMZ 1.5.3 (DataMapper OverZealous Edition) - El Forum - 10-16-2009 [eluser]OverZealous[/eluser] @ennis See the documentation. |