Skip to content

Instantly share code, notes, and snippets.

@solnic
Created June 4, 2013 13:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save solnic/9c5d3fd36d9fba463eb4 to your computer and use it in GitHub Desktop.
Save solnic/9c5d3fd36d9fba463eb4 to your computer and use it in GitHub Desktop.

I started thinking how to aproach rom in a slighly different way - instead of mappers wrapping relations have a higher-level "relation" concept (sth like ROM::Relation) that wraps an axiom relation and uses an injected mapper instance to load/dump objects

so basically splitting rom into rom-relation and rom-mapper

the only thing that kinda bothers me is that for assocations to work we need relations to have access to relation graph so they can perform join. Probably that's not a big deal though

some info would have to be shared between relation and mapper, like attribute names with mappings and association definitions (or at least part of this info)

in general it seems like building relation graph is complex enough to have it as a separate project, it would provide a "raw" database access and rom-mapper would give you ability to load/dump objects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment