Benoit Montuelle さんは書きました:
Hi,

In your example, user class is a Doctrine_Record descendant, so it's a row of the DB table.
Saving and deleting individual records are done within this class.

UserTable extends from Doctrine_Table and serve to execute queries, typically to return user instances.
Mass operations, searching for records are in this class.

Regards,
Benoit



Le 24 mars 2010 à 07:49, 張偉 <[email protected]> a écrit :

Hello guys!

I'm a begainner of symfony and doctrine technology.

Yestoday, I set up
symfony1.4+netbeans6.8+php+doctrine+mysql+apache+windows and displayed
the http://localhost/frontend_dev.php/ . :-D

Today, I want to make doctrine work.

I used Doctrine:build tool to build forms, filters and modules like
User.class.php and UserTable.class.php from my existed database.

My question is:
What is the difference of User.class and UserTable.class?

in user.class I can use
"Doctrine::getTable('User')->findOneByName($param);" to get a user.
in usertable.class I can use "$this->findOneBy('name', $param);" to find
a user.

Thank you very much.

--
If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

To unsubscribe from this group, send email to symfony-users+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

Thank you very much, now I am clear.

--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

To unsubscribe from this group, send email to symfony-users+unsubscribegooglegroups.com 
or reply to this email with the words "REMOVE ME" as the subject.

Reply via email to