rom icon indicating copy to clipboard operation
rom copied to clipboard

Configuration option for struct_namespace

Open mereghost opened this issue 3 years ago • 0 comments

During the rom container setup, if would be very useful to have a struct_namespace setting so that we don't need to pass this to Repositories/Relations.

Another idea is that this could be part of auto_registration under a certain directory (I'm biased towards Entities :p )

Examples

config = ROM::Configuration.new(:sql, 'sqlite::memory:')
config.struct_namespace SomeConstant::Maybe::MultiLevel

This would reduce the amount of boilerplate when setting up repositories & relations needed. Of course, a local call to struct_namespace should have precedence (for folks who split theirs entities into a bunch of different namespaces).

mereghost avatar Sep 15 '20 09:09 mereghost