On Wed, Apr 03, 2013 at 08:41:05AM -0700, Rippl, Steve wrote:
> Have I given you enough info?

I think so but I want to make sure I got it right. Tell me if the thing 
below is correct:

$course_section_rs->search({}, {
join => [
  { 'course' => [     <------------------- me -> belongs_to(course)
    { course_coursetypes  => 'type' }, <-- me -> belongs_to(course) -> 
has_many(course_coursetypes) -> belongs_to(type)
    { course_grades => 'grade' }, <------- me -> belongs_to(course) -> 
has_many(course_grades) -> belongs_to(grade)  
    'course_locations',  <---------------- me -> has_many(course_locations)  
(this one is not referenced anywhere - mistake?)
  ] },
  { 'section' => { 'section_staffs' => 'staff' } } me -> belongs_to(section) -> 
has_many(section_staffs) -> belongs_to(staff)
]})

If this is true (specifically the has_many(section_staffs) part) then this:
> Each Section only has one teacher and belongs to one course
can't be correct...

Please clarify ;)


_______________________________________________
List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

Reply via email to