[Dbix-class] Adding a relationship at runtime.
Matt S Trout
dbix-class at trout.me.uk
Tue Jun 5 01:33:25 GMT 2007
On Mon, Jun 04, 2007 at 08:22:05PM +0400, Oleg Pronin wrote:
> Well, i have users and games.
> Each user has a general result row for each game (usergame, has column
> rating, settings etc).
>
> user -> has_many usergames
>
> Each game has the perl server (daemon). And inside those server
> the relationship between user and usergame become exactly has_one.
>
> I want to add 'has_one' relationship inside the perl server (the schema has
> already been created at this momemt) and proxy common usergame columns to
> simply call
> $user->rating, $user->settings etc.
Why not just do the add_rel on the class then re-register_source the
result_source_instance ?
--
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