Magento Expert Forum - Improve your Magento experience

Results 1 to 4 of 4

How Magento ORM works?

  1. #1

  2. #2
    Junior Member kajal's Avatar
    Join Date
    Sep 2014
    Location
    Bangalore
    Posts
    1,127
    Thanks
    0
    Thanked 15 Times in 15 Posts

    Default

    As most modern systems, Magento implements an object-relational mapping (ORM) system. Object-relational mapping (ORM, O/RM, and O/R mapping) in computer software is a programming technique for converting data between incompatible type systems in object-oriented programming languages. ... Magento Models.

  3. #3
    Junior Member
    Join Date
    Sep 2016
    Posts
    212
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    ORM stands for Object Relational Mapping. It’s a programming technique used to convert different types of data to Objects and vice versa.
    In Magento, ORM is shown as Model (based on Zend Framework’s Zend_Db_Adapter), which further breaks down to two types of Models.

    First is the “simple” i.e. Regular Models which is nothing but flat table or our regular table structure.
    Second Model is EAV (Entity Attribute Value), which is quite complicated and expensive to query.

  4. #4
    Junior Member
    Join Date
    Apr 2017
    Location
    Ahmedabad, India
    Posts
    273
    Thanks
    3
    Thanked 3 Times in 2 Posts

    Default Magento

    In Magento, ORM is shown as Models (in Magento design pattern MVC). Most of the models are inherited from the Varien_Object class, along with using PHP magic get and set functions to set and retrieve the data of the object:

    product = Mage::getModel(‘catalog/product’)->setPrice(100);
    echo $product->getPrice();

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •