Animal Rights
Animal Rights

Reputation: 9377

Working with SQL Joins in Propel ORM

I am working with a Propel query that is similar to the situation below. Can someone explain what joinSubTopic() is? I'm guessing this is an auto-generated Propel method, but I'm not quite sure how to make sense of it because I cannot find anything in the documentation with a method like that.

Query:

LectureQuery::create()->joinSubTopic()->find()

Relationship: Lecture can have more than 1 SubTopic.

SubTopic.lecture_id is a Foreign Key to Lecture.id

Upvotes: 0

Views: 1527

Answers (1)

j0k
j0k

Reputation: 22756

This is just a basic join function auto-created when you build classes. You find it in the documentation.

These 2 calls are the same:

LectureQuery::create()->joinSubTopic()->find();
LectureQuery::create()->join('SubTopic')->find();

Upvotes: 3

Related Questions