[Deprecated] DMZ 1.5.4 (DataMapper OverZealous Edition) |
[eluser]OverZealous[/eluser]
[quote author="peterparker2k" date="1256157057"] 1. creating more complex queries with count: [/quote] DMZ does not explicit include support for that kind of query (as of now). However, you can modify your query using normal AR methods. It's not very clean, but it will allow you to get the job done. ;-) Code: $g = new Group(); This is a useful enough (and simple enough) feature I might add a include_related_count() feature in the future. Quote:2. Delete relation, avoid setting id to NULLNot sure what you are asking. If you delete an object, all relationships are deleted at the same time. If you delete a relationship, it does not delete the object itself. You can only delete an object by calling delete() with no arguments, or delete_all() if you have a set of objects to query. Deleting a relationship that uses an ITFK simply sets the ITFK column to NULL. Not sure how it could work otherwise. Quote:3. Unnecessary SELECT statements:First, performance of these queries is almost not worth the effort. If they bother you, see here. Please do not enable the production cache while developing. Read the big red warning. |
Welcome Guest, Not a member yet? Register Sign In |