• 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: ERXMigrationTable.newColumn does not set default value
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ERXMigrationTable.newColumn does not set default value


  • Subject: Re: ERXMigrationTable.newColumn does not set default value
  • From: Mike Schrag <email@hidden>
  • Date: Thu, 10 Apr 2008 00:09:07 -0400

Using DB defaults may *not* be a good idea if you don't also have them in EOF code. EOF will save and then have a different value in mem as in the DB.
The intent (though I don't know if it's clear in the API) of setting defaults is ONLY for use in migrations so that you can add a not-null column and set a default value for existing rows to prevent it from failing with a constraint violation. They should ONLY be used on not- null columns that are also marked allows null = false in your model so EOF will fail before it hits the DB, or you will suffer the fate that Anjo describes.

ms

_______________________________________________
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: ERXMigrationTable.newColumn does not set default value
      • From: Helmut Schottmüller <email@hidden>
References: 
 >ERXMigrationTable.newColumn does not set default value (From: Helmut Schottmüller <email@hidden>)
 >Re: ERXMigrationTable.newColumn does not set default value (From: Mike Schrag <email@hidden>)
 >Re: ERXMigrationTable.newColumn does not set default value (From: Helmut Schottmüller <email@hidden>)
 >Re: ERXMigrationTable.newColumn does not set default value (From: Anjo Krank <email@hidden>)

  • Prev by Date: Re: ERXMigrationTable.newColumn does not set default value
  • Next by Date: Wonder AJAX Fileupload problem.
  • Previous by thread: Re: ERXMigrationTable.newColumn does not set default value
  • Next by thread: Re: ERXMigrationTable.newColumn does not set default value
  • Index(es):
    • Date
    • Thread