in reply to Catalyst and has_many relationship

First of all the error doesn't seem to be related to Catalyst at all, you just happen to be using it along side with DBIx::Class. It might be easier for you to debug if you create a small command line script that tests your DBIx::Class setup, rather than doing it in Catalyst.
Probably, is that I don't know how to create the realtionship at inserting-time (rather that at configuration time) when I use add_to_relation.

Why wouldn't you want to create a relation at configuration time? It sounds easy, and certainly is the recommended way.