[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipselink-users] Load mapping file at "runtime"
|
I'm having a wee bit trouble figuring out if and how I can specify a one
or more mapping-files based on some business logic when I create my
entitymanager (or before).
I basically have an entity where I have a string I'd like to map to
different kinds of columns (read only) based on some information I have
before I create my EMF and EM, but not at build/compile time.
So can one feed EclipseLink with the mapping files in any other way than
through the persistence.xml-file?
Some background:
The reason I want to do this is that I have an ecommerce app that I'm
connecting to. Now this web app has several different payment solutions
whereas they pretty much all create a one or more new columns in the
database. These of course have different names...
Now people usually only just use one of these payment solutions, so I
thought I'd support this by having some generic strings in my entity
class that maps to whatever column(s) the plugin adds. This way I don't
have to maintain different entities of an order just to support
different payment providers for instance.
--
Kind regards
Christian Michelsen