No subject


Sun Nov 20 20:48:46 GMT 2022


```
We've been using Schema::Loader for years on a large postgresql database. Over the years 
we've had to add manual relationships to the generated schema files because S:L was missing 
them for various reasons (often because they weren't declared in the database itself yet).

Now our schema is more complete and S:L is better at finding relationships and is adding 
them to the generated schema files. However, they're being silently overridden by the manual 
relationships we added previously.  The old manually added relationships are usually 
incomplete and sometimes plain wrong.

The attached patch makes it easy to identify redefined relationships. It carps is a relationship 
is redefined while DBIC_TRACE is set.

Some other env var or control mechanism could be used, I just picked DBIC_TRACE as an easy 
option. (I'd be happy if warnings were the default and were silenced by adding an attribute 
like is_redefintion=>1 to the new relationship definition.)
```



More information about the DBIx-Class-Devel mailing list