|
|
|
|
|
|
Unfortunately the incredible plan that was designed while the development team was meeting in Stockholm a few years back has been lost. So I'll try to re-construct an new awesome plan/design here :)
The general idea is to: # (optional) build a {{BootstrapServiceRegistry}} # (~ optional) build a {{StandardServiceRegistry}} # instantiate a {{MetadataSources}} object, and tell it about the sources for mapping information # build a {{Metadata}} object (representing processed metadata sources). We get here along a few possible paths, depending on what non-default behavior/settings should be used: ## {{MetadataSources#buildMetadata()}} - uses all defaults for building the {{Metadata}}. What about connection info, or other information we really need? To be fair we don't really *need* the JDBC connection info here; its just nice because we can use it (knowing the dialect) for automatically handling certain mapping stuff (quoting keywords e.g.) ## {{MetadataSources#getMetadataBuilder()}} - used to obtain a {{MetadataBuilder}} that can further control the {{Metadata}} building process. ## {{MetadataSources#getMetadataBuilder(StandardServiceRegistry)}} - used to obtain a {{MetadataBuilder}} that can further control the {{Metadata}} building process given a specific {{StandardServiceRegistry}} # build a SessionFactory via {{Metadata#buildSessionFactory}}
|
|
|
|
|
|