• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can I force a reload of a database's JDBC info?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can I force a reload of a database's JDBC info?


  • Subject: Re: Can I force a reload of a database's JDBC info?
  • From: Chuck Hill <email@hidden>
  • Date: Fri, 04 Mar 2016 04:15:00 +0000
  • Thread-topic: Can I force a reload of a database's JDBC info?

You can remove the jdbc2Info key from the connection dictionary(ies) and then call setConnectionDictionary on the adaptor for each model (or just one if they all connect to the same database).  Then call JDBCAdaptor.typeInfoModel(EOModel) get get things setup again.  That looks like it should do it.

Chuck


From: <webobjects-dev-bounces+chill=email@hidden> on behalf of Paul Hoadley <email@hidden>
Date: Thursday, March 3, 2016 at 3:13 PM
To: WebObjects Development <email@hidden>
Subject: Can I force a reload of a database's JDBC info?

Hello,

As discussed in a recent thread (“Use case for a "case insensitive equals" qualifier”), I want to use PostgreSQL’s CITEXT extension type on a column (User.username). I’d like to make the change using migrations.

Because CITEXT is an extension type, you need to create it in any database where you want to use it:

CREATE EXTENSION IF NOT EXISTS citext;

That’s fine: I can just call ERXJDBCUtilities.executeUpdate() in the appropriate migration upgrade(). However, what _seems_ to be going on is that EOF loads the database’s JDBC info at launch, and (because the extension hasn’t been created) it doesn’t seem to contain CITEXT. So, despite running CREATE EXTENSION in the migration, it fails because nothing is known about the External Type for that attribute:

JDBCAdaptorException: Unable to find type information for external type 'citext' in attribute 'username' of entity 'User'.  Check spelling and capitalization.

If I create the extension manually before launching and running that migration, it proceeds just fine.

Am I stuck with manually creating the extension everywhere I want to deploy this, or is there a way to force EOF to reload the JDBC info at the appropriate time?


-- 
Paul Hoadley
http://logicsquad.net/



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Can I force a reload of a database's JDBC info?
      • From: Paul Hoadley <email@hidden>
    • Re: Can I force a reload of a database's JDBC info?
      • From: Paul Hoadley <email@hidden>
References: 
 >Can I force a reload of a database's JDBC info? (From: Paul Hoadley <email@hidden>)

  • Prev by Date: Can I force a reload of a database's JDBC info?
  • Next by Date: Re: a trick to model a complex derived relationship?
  • Previous by thread: Can I force a reload of a database's JDBC info?
  • Next by thread: Re: Can I force a reload of a database's JDBC info?
  • Index(es):
    • Date
    • Thread