• 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: Paul Hoadley <email@hidden>
  • Date: Sat, 05 Mar 2016 17:53:35 +1030

Hi Chuck,

On 5 Mar 2016, at 5:19 am, Chuck Hill <email@hidden> wrote:

I missed something.  You could make a JDBCPlugIn subclass, override jdbcInfo() and add the definition for citext to what super returns.  A lot of the existing plugins do this.    That is not difficult to do and you define the plugin class in the model connection dictionary.  That is probably the cleanest most reliable solution.

This works, and as you say it’s much nicer than hacking around in the migration’s upgrade() method. It’s essentially the same code as I posted earlier, though operating on the jdbcInfo dictionary rather than the connectionDictionary. Neat solution—thanks for steering me into it, Chuck.

Having overridden jdbcInfo(), it’s interesting to see how many times that gets called during launch: a couple of times at the start of migrations, and then once per migrating model. And it would seem to be getting the JDBC info from the database each time, because after the Ident migration in which we add the CITEXT extension, the next call to jdbcInfo() in my subclass finds the CITEXT entry in the dictionary from super.jdbcInfo(). That is, this must be perilously close to working out of the box, without subclassing PostgresqlPlugIn. It’s not obvious why the very next migration (that touches an entity with a CITEXT attribute) would be the one that fails without the subclass’s behaviour, then, but I’m going to leave it there now since this is all working nicely.


-- 
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

References: 
 >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: Chuck Hill <email@hidden>)
 >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: Chuck Hill <email@hidden>)
 >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: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Can I force a reload of a database's JDBC info?
  • Next by Date: Building Wonder 7 on Windows problem
  • Previous by thread: Re: 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