On Sun, 15 Jun 2008 18:22:22 +0200, Emmanuel Bernard
<[EMAIL PROTECTED]> wrote:
I am not sure if I like lazy field loading in the second case. The
proposed metadata to FieldBridge (FieldBridge.fieldNameStrategy()
EXACT, IN_NAMESPACE, NON_SAFE) seems very artificial. If we extend the
FieldBridge interface why not just add a new methods getFieldNames()
which returns a array of String listing all field names this bridge is
using?
I thought about that but you don't always know :) Thing Maps mapped with
the key as the field name.
True, but that is really an exceptional case. In most cases the added
field names will be constant, otherwise it is damn hard to write a query.
getFieldNames(String name) could return null in case the field names are
dynamic. The API is not 100% intuative this way, but I think I still would
prefer a explicit list of field names over a enum type like EXACT,
IN_NAMESPACE or NON_SAFE.
--Hardy
_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev