DMZ 1.7.1 (DataMapper OverZealous Edition) |
[eluser]OverZealous[/eluser]
@Everyone For the other recent questions, I'm sorry I don't have time to fully respond to you all directly. I'm accepting a new job in a new city in a different state as I write this. :cheese: This is actually great news in the long run! I'll explain in a bit. In the short term, this means that I won't be able to provide much support or feedback for DMZ. I have a lot to do with preparing a house for being sold, packing, etc. I'll do my best, but the more in-depth answers I have been giving in the past are probably not going to be seen for a while. It will also probably be days—not hours—before I can respond to questions. I hope that my current users will do their best to help provide answers during my transition. ;-) The company I am going to work for uses CodeIgniter. They have been interested in the work I've done on DMZ, and I believe (although I have no guarantee of this) that DMZ will become an integral part of the work I do there. What this may mean is that I effectively will get paid to ensure that DMZ is kept up-to-date. Even if this isn't my primary job, it hopefully will be good for the project. :coolsmile: I'll now try to provide some feedback for the other questions. ![]() ---------- @tomdelonge Self-relationships should work perfectly. For some example of how this might look, check out the bug model, and see the dependent-dependency relationship. It's not actually used in the application, but that is how it might look. You can easily set it up with one side under $has_one, and the other stays under $has_many. Also, in the manual, on the Advanced Relationships page, the post-related_post relationship is another good example. Note that to save or delete a self-relationship, you'll need to specify the relationship key, like so: Code: $bug->save($other_bug, 'dependent'); ---------- @santiagofs For questions like this, please take the time to explain your actual problem. Otherwise we're just guessing. As it stands, I have not heard of this issue. ---------- @Henry Merriam It would be fairly easy to write a custom magic __call or __get function. I wouldn't make it part of the core, but you could make it part of a custom class. See the second part of Using Extensions for ideas on how to do this. Make sure you call parent::__call/__get after your own customizations. If you use this sporadically on different models, you could write an extension to provide the methods. However, extensions cannot handle magic methods, so you'd probably need to have a method more like localize_value($field, $value = NULL) ---------- @Cord I'm not going to say it's impossible, but DMZ just isn't design to work this way. If you get it working, great! Some tips: • DMZ only connects to a database when it first needs it (ie: the first time $object->db is referenced). • You can force a model to reload it's configuration for the remainder of the request (and for any new models) with the new reinitialize_model method. • Remember that you'd have to go through this for every request. It's too bad that you are being asked to develop it this way. As long as the access to this information is available through the same application, there is absolutely no benefit to breaking it up into different databases. It's a waste of developer time, since it provides no extra security to the users that isn't already available through normal authorization. :down: Good Luck! ---------- Talk to you all soon! :-) |
Welcome Guest, Not a member yet? Register Sign In |