hi,
i have two table define as below:
Node:
actAs: { Timestampable: ~ }
columns:
id: {type: integer(8), primary: true, autoincrement:
true}
....
relations:
Category:
class: Category
local: category_id
foreign: id
type: one
foreignType: many
foreignAlias: Nodes
Reminder:
columns:
id: { type: integer(8), primary: true, autoincrement:
true}
.....
node_id: { type: integer, notnull: true }
relations:
Node:
class: Node
local: node_id
foreign: id
type: one
foreignType: one
foreignAlias: Reminder
Node and Reminder tables
with one to one relation
but when blew command executed:
$reminders = Doctrine_Query::create()
->from('Reminder r')
->fetchOne();
and i want to access node associated to reminder object by below
code:
$reminder->getNode()->getId();
below error occured:
PHP Fatal error: Call to a member function getId() on a non-object
and when i want to join node to reminder by this code:
$reminders = Doctrine_Query::create()
->from('Reminder r')
->leftJoin('r.Node n')
->fetchOne();
this error occured :
PHP Fatal error: Call to a member function getLast() on a non-object
in \lib\plugins\sfDoctrinePlugin\lib\vendor\doctrine\Doctrine\Hydrator
\RecordDriver.php on line 129
please help me what happends
thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---