Skip to content

Instantly share code, notes, and snippets.

@gbadner
Created June 13, 2011 15:52
Show Gist options
  • Save gbadner/1023040 to your computer and use it in GitHub Desktop.
Save gbadner/1023040 to your computer and use it in GitHub Desktop.
How to resolve type in metamodel?
How should persisters get property type (i.e. o.h.type.Type)?
Alternatives:
1) in MetamodelImpl: new MetamodelTypeResolver( this ).resolve();
2) in persisters: attributeBinding.getType( typeResolver );
- typeResolver would be the TypeResolver scoped to the SessionFactory
@gbadner
Copy link
Author

gbadner commented Jun 13, 2011

(09:06:14 AM) sebersole: gbadner: my initial thought is a combo
(09:06:37 AM) sebersole: SF will still need something like TypeResolver for queries
(09:07:31 AM) sebersole: i would really love for types to be resolved as part of the metamodel, just not sure that is going to be feasible
(09:08:00 AM) sebersole: unless we keep using the current scheme of scoping the "resolver" to the SF after SF is built
(09:08:29 AM) gbadner: sebersole, oh, ok; I thought that was the plan
(09:08:46 AM) gbadner: 2) is in line w/ that
(09:08:47 AM) sebersole: well it is the plan because we have no better one
(09:09:12 AM) gbadner: well, seems like a good plan
(09:09:32 AM) sebersole: any other plan, i believe, would require splitting type api
(09:09:47 AM) sebersole: really there is a natural split there anyway

@gbadner
Copy link
Author

gbadner commented Jun 13, 2011

Until I hear otherwise, I'll assume that the SessionFactory has a "scoped" TypeResolver and that Attribute.getType( typeResolver ) (alternative 2) will be used to get attribute types.

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