[Dbix-class] weird result_source_instance problem

Matt S Trout dbix-class at trout.me.uk
Sat May 26 14:24:31 GMT 2007


On Sat, May 26, 2007 at 10:15:59AM +0200, Tobias Kremer wrote:
> >>>Ok, I tried to strip down my schema so that you can have a look  
> >>>at it:
> >>>
> >>>http://www.funkreich.de/files/dbic_wreck.tar.gz
> >>
> >>Check out this dump of $user->result_source->schema(). Just by  
> >>changing
> >>the name given to register_source the class mapping changes
> >
> >I think we need a way to indicate 'primary source for class' then.  
> >Or go
> >back and make the source_name (rather than class name) form of  
> >relationship
> >specification work, finally. Or both.
> >
> >Thoughts?
> 
> Well, I must admit that I'm still trying to understand the problem.  
> Are the relationships
> resolving to wrong result_source classes because there are multiple  
> possibilities?
> 
> Looks like I won't be able to fix this with a quick hack for now,  
> will I?

Wrapping clone() and compose_namespace() to overwrite the appropriate
key in class_mappings afterwards might do the trick?

The problem is that DBIC keeps a reverse lookup of classes to sources to
deal with $schema->source($classname) - and the current relationship 
declaration style requires that.

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director    Want a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/             http://www.shadowcatsystems.co.uk/ 



More information about the Dbix-class mailing list