[Deprecated] DMZ 1.6.2 (DataMapper OverZealous Edition) |
[eluser]TheJim[/eluser]
Quote:I don’t agree that your second suggestion is necessary: I agree with #2. Actually, I only added that in when I posted in the forum. For some reason, I felt like I was missing a case when I wrote the post, but yes, references should take care of it. However, I still think the empty case is necessary, not for performance reasons, but because if the related object is saved with ITFK and passed in an array, but not unset, then when we get to Code: (Line 1096) $object isn't empty, so _save_related_recursive raises an error. I don't remember exactly where it happened, but this is what I came across when integrating DMZ into my work-flow, so I could back-track and give a more detailed example if necessary. Quote:I think you are correct in your third suggestion. However, using the solution you provided will not work, as all fields will be copied over, even if there is a collision. I’ll work up a solution. I think in my mind I wasn't considering those situations because it would be kind of a bad field naming scheme. But it could definitely happen, so you're right; you would want to keep what you had before with a special case only for the ITFK. I'll check into get_sql; I was unaware of its existence. Thanks. Jim
[eluser]chadbob[/eluser]
[quote author="OverZealous" date="1260882092"][quote author="chadbob" date="1260881301"]Can someone help me figure out how to sort results by a related count?[/quote] First, before I post anything, don't load models! They are already loaded automatically. It might not say this in the manual (although I thought it did, but I couldn't find it). [/quote] This worked perfectly, thanks! And thanks for the other tips as well, I thought sure I had read in the docu (For 1.5.4) that you needed to call models, but I'm no longer doing so as per your info. Thanks again.
[eluser]OverZealous[/eluser]
@TheJim Thanks for the more in-depth info on the ITFK bug. I'll add in the object unsetting. Always hate those one-off errors! get_sql is brand new to 1.6. It's part of the system that allows for subqueries. That is, however, why get_sql ignores the traditional relationship structure.
[eluser]tomdelonge[/eluser]
So, I keep getting this: Fatal error: Class 'vote' not found in /mydirectoryhere/application/libraries/datamapper.php on line 1288 The thing is, I'm not using a vote table anymore. There's no vote model, there's no vote table, and there's no production cache. Why is it even trying to look for the class? Nevermind I figured it out. It was still referenced in one of my relationships. Don't know how I missed it.
[eluser]Cro_Crx[/eluser]
I have a problem with DMZ. My problem is that it's just too awesome for me to calm down about it. Seriously, keep up the good work ![]() It's a shame I had to go to all the effort of learning Ruby on Rails before I figured out the benefits of using a Database Object Mapper system. I've mocked up some quick sketches that clearly shows the benefits of using DMZ === Development Time === Before DMZ - ========================> Using DMZ - ==========> === Code Reuse === Before DMZ - ==========> Using DMZ - ========================> === The amount of frustration when people ask me to make changes to the application late in the development process Before DMZ - ========================> Using DMZ - =====================> === Client stupidity === Before DMZ - ========================> Using DMZ - =========================> I think the last figure can be attributed to the new generation of clients that ask more (I didn't think it was possible) stupid and pointless questions than before.
[eluser]OverZealous[/eluser]
LOL - Thanks for the laugh and the support. It's really appreciated!
[eluser]OverZealous[/eluser]
I've posted a poll to help gauge DMZ's user base. If you don't mind, clicky on over here, and pick an option! Thanks!
[eluser]rideearthtom[/eluser]
Hi, and thanks for the great work you've done. This is exactly what I was looking for. Just a quick question - I've created a simple class, and in my controller I'm calling get_where on it. I can use the resulting object properties no problem. I passed the object directly to my view and for the sake of development I called var_dump() on the object to output the data for checking. To my great surprise, my machine froze up, and a few minutes later I had a monolithic array on screen in my browser, thousands of lines, seemingly containing every piece of information about every element of my CodeIgniter installation, all my config variables, everything. I don't think that's normal - is it? Could it be because I'm using non-DataMapper models for authentication? (I'm using ReduxAuth, and it seems to be spitting out a lot of Redux stuff as well.) Do you think I've misconfigured something? I know in the manual you say to clear out the autoload models array, but I need to keep my ReduxAuth model in there at least...
[eluser]OverZealous[/eluser]
Please see the troubleshooting section of the docs.
[eluser]rideearthtom[/eluser]
I did, but the first time round I failed to notice the entry dealing with var_dump... whoops! Sorry... |
Welcome Guest, Not a member yet? Register Sign In |