1
votes

I have a bunch of DBIx::Class modules created automatically by dbicdump. It does a great job, but is there a way to remove some relationships it creates? Or prevent a select few from being created? I saw skip_relationships, but that's an all-or-nothing. Any thoughts?

1
Can you give an example of a relationship you want to remove? It may cause more problems removing it than ignoring it. If it's an enforced constraint, the inability to explore it through the model may cause some hard to reason about errors down the line. - kbenson
That's a good point, it is a foreign key column, but it's just one that I'd never have need to access directly. A table has two columns pointing to the same table, just to establish relationships based on extra information. So, a bit like a dictionary where I'd have no call to use it in reverse. - user1236508

1 Answers

0
votes

Looking at the source of DBIx::Class::Schema::Loader::RelBuilder, it seems that this isn't possible. But I think it's a useful feature that should be easy to implement. You might want to open a wishlist ticket.