EOModelGroup group = EOModelGroup.defaultGroup();
EOModel model = group.modelNamed("YourModel");
EOAdaptor ad = EOAdaptor.adaptorWithModel(model);
log.debug("adaptor cd:"+ad.connectionDictionary());
log.debug("adaptor pi:"+ad.plugInName());On 31/03/2013, at 6:15 AM, Klaus Berkling wrote: > > On Mar 29, 2013, at 11:36 PM, Paul Hoadley <[email protected]> wrote: > >> I (think I) want to determine what plugin is in use for a particular model >> at runtime. What's the easiest way? (I see EOAdaptor.pluginName(), but, >> somewhat embarrassingly, I can't quite work out how to get the EOAdaptor >> object for a model.) > > How about looking at the jdbc URL: > > dbConnectURLGLOBAL= jdbc:h2:file:... > dbConnectURLGLOBAL=jdbc:mysql:... > dbConnectURLGLOBAL==jdbc:oracle: > >> (This relates to my recent thread "Disable constraint checking under H2". I >> want to do exactly that: at runtime, if the H2 plugin is in use, I'll run >> "SET REFERENTIAL_INTEGRITY FALSE;". If anyone can suggest a better way to >> do that conditional on running H2, I'm all ears.) > > > > kib > > "The essence of training is to allow error without consequence." > Orson Scott Card > > Klaus Berkling > Web Application Dev. & Systems Admin > DynEd International, Inc. > www.dyned.com > > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list ([email protected]) > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/webobjects-dev/matt%40logicsquad.net > > This email sent to [email protected] -- Matt. http://logicsquad.net/
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
