I have created a custom module with my own db table. My question is; what data is available to me in the block class while I'm editing an entry?
For example, I use the products collection in my block and call it as follows:
$collection = Mage::getModel('catalog/product') ->getCollection() ->addAttributeToSelect('*');
Now, I can use the getters to retrieve info, such as:
$collection->getEmail(); $collection->getFirstname(); ... etc, etc
Now, if my custom model is called
test_model/test, and I have an instance like so:
$test = Mage::getModel('test_model/test');
Calling a getter for
getMyfield(); produces nothing. Obviously, if I explicitly load an item:
$test = Mage::getModel('test_model/test')->load('1');
Then I do have those getters available.
So... what am I missing? Why do I have to load the row I want first? Shouldn't it be available on edit with
Help a Mage nooby out, please.