From 1759f9ab83a7ac2408bf54876f9ac84e60bfe98c Mon Sep 17 00:00:00 2001 From: Colin Newell Date: Fri, 9 Sep 2016 18:32:12 +0100 Subject: [PATCH] Minor doc addition to demonstrate a common cause of the problem. --- lib/DBIx/Class/Manual/Troubleshooting.pod | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/DBIx/Class/Manual/Troubleshooting.pod b/lib/DBIx/Class/Manual/Troubleshooting.pod index f5e06b8aa..d16ed6fd2 100644 --- a/lib/DBIx/Class/Manual/Troubleshooting.pod +++ b/lib/DBIx/Class/Manual/Troubleshooting.pod @@ -33,6 +33,14 @@ For some reason the table class in question didn't load fully, so the ResultSource object for it hasn't been created. Debug this class in isolation, then try loading the full schema again. +This is often because you are trying to access result_source_instance +before the call to table, e.g. + + __PACKAGE__->result_source_instance->view_definition('...'); + __PACKAGE__->table("page_attributes"); + +Ensure your call to table is before result_source_instance is accessed. + =head2 Can't get last insert ID under Postgres with serial primary keys Older L and L versions do not handle C