1
- ##1 . Which methods exist to access the table of a resource model?
1
+ ## 1. Which methods exist to access the table of a resource model?
2
2
3
- Mage::getModel('core/resource')->getTableName('colin_database/results');
4
- Mage::getModel('core/resource')->getMainTable('colin_database/results');
3
+ Mage::getModel('core/resource')->getTableName('colin_database/results');
4
+ Mage::getModel('core/resource')->getMainTable('colin_database/results');
5
5
6
- ##2 . Which methods exist to create joins between tables on collections and on select instances?
6
+ ## 2. Which methods exist to create joins between tables on collections and on select instances?
7
7
8
8
- join()
9
9
- joinInner()
13
13
- joinCross()
14
14
- joinNatural()
15
15
16
- ##3 . How does Magento support different RDBMSs?
16
+ ## 3. How does Magento support different RDBMSs?
17
17
18
18
<global>
19
19
<resources>
46
46
$resource = Mage::getModel('core/resource')->getConnection('wordpress_read');
47
47
48
48
49
- ##4 . How do table name lookups work, and what is the purpose of making table names configurable?
49
+ ## 4. How do table name lookups work, and what is the purpose of making table names configurable?
50
50
51
51
Mage::getModel('core/resource')->getTableName('colin_database/results');
52
52
@@ -60,17 +60,17 @@ Which events are fired automatically during CRUD operations?
60
60
- model_delete_after
61
61
- model_delete_commit_after
62
62
63
- ##5 . How does Magento figure out if a save() call needs to create an INSERT or an UPDATE query?
63
+ ## 5. How does Magento figure out if a save() call needs to create an INSERT or an UPDATE query?
64
64
65
65
Checks for * $object->getId()*
66
66
67
- ##6 . How many ways exist to specify filters on a flat table collection?
67
+ ## 6. How many ways exist to specify filters on a flat table collection?
68
68
69
69
- $model->getCollection()->addFieldToFilter()
70
70
- $model->getCollection()->getSelect()->where()
71
71
72
72
73
- ##7 . Which methods exist to influence the ordering of the result set for flat table collections?
73
+ ## 7. Which methods exist to influence the ordering of the result set for flat table collections?
74
74
75
75
- $model->getCollection()->setOrder($field, $dir)
76
76
- $model->getCollection()->getSelect()->order("$query")
0 commit comments