CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • DAO
Pages: [1]

Author Topic: DAO  (Read 1069 times)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
DAO
March 01, 2009, 10:32:01 pm
Hello,

What does DAO stand for and how is a DAO name made up?

I'm looking at this line

  * @param string $daoName       Name of the DAO (Example: CRM_Contact_DAO_Contact to retrieve value from a contact)
 
and while the example makes sense I'm not sure how I would know what other tables can be accessed this way. I notice looking at this one 'CRM_Member_DAO_MembershipType' that MembershipType is not the same as the table name
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Kiran Jagtap

  • Ask me questions
  • ****
  • Posts: 533
  • Karma: 51
Re: DAO
March 02, 2009, 03:52:13 am
hi

Quote
What does DAO stand for and how is a DAO name made up?
DAO -> Data Access Object. You might want to read more

Quote
I'm not sure how I would know what other tables can be accessed this way.
Every table has it's own DAO.

Quote
I notice looking at this one 'CRM_Member_DAO_MembershipType' that MembershipType is not the same as the table name
You can call $DAOobject->getTableName(), this will give you table name.

Or

Check xml/schema/Member/MembershipType.xml
Code: [Select]
<class>MembershipType</class>
 <name>civicrm_membership_type</name>
here 'class' = DAO class name and 'name' = db table name

kiran
You Are Designed To Choose... Defined By Choice.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: DAO
March 03, 2009, 01:00:15 am
Thanks for that - only thing is I can't find Check
Quote
xml/schema/Member/MembershipType.xml

It's not in the download
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: DAO
March 03, 2009, 01:16:57 am
Found it
http://svn.civicrm.org/civicrm/trunk/xml/schema/
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • DAO

This forum was archived on 2017-11-26.