Skip to main content

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

Thanks James, I'll look at those Session Events.

I understand why you make the suggestion about the model and extra mappings,
but the tables are identical across all schemas, therefore the entities
would be identical. Now i could provide a new orm.xml file for each schema
instance, but we have  upwards of 100. And it's possible that one could be
added at any time. If that occurs we would have to do an update to each
application using this library to handle the new schema. 

With the appropriate management of the event stack and lifecycle, we can
manipulate the SQL just prior to execution and update the referenced schema
appropriately.

Thanks again!

-B


James Sutherland wrote:
> 
> There are pre/postExecuteQuery events on the SessionEventManager (these
> are session events, not descriptor events).
> 
> You might be better off handling this complexity in your application/model
> instead of trying to automate it.  i.e. have several different classes or
> subclasses mapped to each schema, or several different
> sessions/persistence contexts, and query the desired one directly.
> 
> EclipseLink does have some features, such as TABLE_PER_CLASS inheritance,
> and VariableOneToOne mappings which may be of some use.
> 
> 

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



Back to the top