Re: ERXMigrationTable.newColumn does not set default value
Re: ERXMigrationTable.newColumn does not set default value
- Subject: Re: ERXMigrationTable.newColumn does not set default value
- From: David Avendasora <email@hidden>
- Date: Tue, 22 Apr 2008 14:33:30 -0400
On Apr 22, 2008, at 1:23 PM, Mike Schrag wrote:
Okay, I'll get the ability to read the
"er.extensions.eoattribute.default" along with the simpler
"Default" from the userInfo dictionary setup in the
ERXMicrosoftPlugIn like it is in the FrontbasePlugIn, and then hand
it off you you and Chuck for review.
"Default" is a contrivance added in the FB plugin only, and is not
used by anything, so I wouldn't bother. I actually would have used
"Default" except that FB decided to define that thing as having an
unclear attribute formatting, which I why I defined a new one.
Okay. No problem.
Out of curiosity, what does the defaultValue parameter as defined
in the Wonder API for ERXMigrationsTable.newXxxxColumn() do?
For example: http://webobjects.mdimension.com/wonder/api/er/extensions/migration/ERXMigrationTable.html#newStringColumn(java.lang.String, int, boolean, java.lang.String)
It gets passed as a default value for the database column (you can
see the sql it generates). This exists only to accommodate
migrations from allows null true to allows null false to deal with
existing data and should not be relied on for ANYTHING else.
Hmm...
Microsoft is so helpful in that after the initial creation of a table
it doesn't allow you to add a new column and mark it as NOT NULL
without defining a default value. You can _not_ create the column,
then populate it after. You have to do it all in one function. I
suppose the work around it to create it as NULL, then _change_ it to
NOT NULL with a second function. It would be nice to handle it so it
is invisible to the developer that SQL Server is a PITA though...
Dave
_______________________________________________
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