Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Dynamic Schemas

Rather than start digging without knowing where to make changes, i figured
i'd ask my question to the developers who created the framework.

I have an entity that's mapped to a table. This table actually exists in
multiple database schemas, they are identical in every way. We use a look-up
table to determine which schema to use. The look-up value is an attribute of
the entity.

I need to be able to put in some kind of logic into an entity SQL generating
stack to change the schema based on that look-up. I know the look-up logic,
but my question is where to manipulate the SQL generation.

I thought about manipulating the Descriptor's qualifier prior to SQL
generation, however i found some thing somewhere that said once the
Descriptor is created for an entity it shouldn't be modified (i assume
threading issues).

So my next thought was to build in some entity listeners to manipulate the
SQL during the call stack. I haven't done that yet because: there's no
pre-read query listener. There are pre/post handlers for create, update, and
delete, but not read...

Suggestions on how i should go about my task? (And why isn't there a
pre-load listener?)

-B
-- 
View this message in context: http://old.nabble.com/Dynamic-Schemas-tp26610882p26610882.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top