Skip to content

Configuration option for struct_namespace #609

@mereghost

Description

@mereghost

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).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Backlog

Relationships

None yet

Development

No branches or pull requests

Issue actions