Re: Migrations problem with FrontBase

2012-12-16 Thread Chuck Hill
It sounds like the wrong prototypes are being used to generate the migration Java. On Dec 16, 2012, at 6:22 PM, Ângelo Andrade Cirino wrote: > Hi list, > > I am moving from MySQL to FrontBase and was presented with the following > error: > > JDBCAdaptorException: Unable to find type informa

Migrations problem with FrontBase

2012-12-16 Thread Ângelo Andrade Cirino
Hi list, I am moving from MySQL to FrontBase and was presented with the following error: JDBCAdaptorException: Unable to find type information for external type 'INT' in attribute 'updateLock' of entity '_dbupdater'. Check spelling and capitalization. at com.webobjects.jdbcadaptor._FrontBaseP

Re: Simple question: inserting data right after table creation (on migration?)

2012-12-16 Thread Flavio Donadio
Johnny, Thanks a lot! Your technique seems to be the most elegant... I'm modifying my code right now. And I see I'm not the only one that got help from this. Nice! Regards, Flavio On 16/12/2012, at 18:45, Johnny Miller wrote: > You can also make your migration file implement: IERXPostMigrat

Re: Simple question: inserting data right after table creation (on migration?)

2012-12-16 Thread Johnny Miller
I've never had that situation but I guess during the update phase you could rename the old column and then create the new one. Then during the post migration phase you could copy and convert the data from the old column to the new one using EOs. And then create a second migration that drops th

Re: Simple question: inserting data right after table creation (on migration?)

2012-12-16 Thread Theodore Petrosky
I may try that next time. However, there are times that I use migrations to alter the database structure. Maybe there was an easier way, but I read a column out to a file, created a new column of the type I wanted, read the file and pushed the data into the new column, then dropped the old colum

Re: Simple question: inserting data right after table creation (on migration?)

2012-12-16 Thread programmingosx
Two additional things about doing it in this method is that you have access to EOF so you don't have to use the utilities or raw SQL and it is run at the end of ALL migrations, so you know your database will be completely migrated when your PostMigrations are run. SecretPal has some nice exampl

Re: Simple question: inserting data right after table creation (on migration?)

2012-12-16 Thread Johnny Miller
You can also make your migration file implement: IERXPostMigration So in your normal migration do your database changes and then in public void postUpgrade(EOEditingContext editingContext, EOModel model) do your inserts. Aloha, Mr. Johnny Miller Web Development Manager Kahalawai Media Company La

Re: D2W and ERAttachment

2012-12-16 Thread Flavio Donadio
David and James, Thanks a lot for the help. I'll have a look into that later. I shouldn't have tried to code this morning. Regards, Flavio On 16/12/2012, at 13:31, David Holt wrote: > http://wiki.wocommunity.org/display/documentation/ERModernLook > > Sent from my iPad > > On 2012-12-16, at

Re: Simple question: inserting data right after table creation (on migration?)

2012-12-16 Thread Paul Yu
This is just for the record. Since my previous reply was bounced because of the wrong sent address. I also use Theodore's approach at times. I use my approach for more complex initial setups of the reference tables etc. Paul On Dec 16, 2012, at 9:51 AM, Paul Yu wrote: > Instead of running a

Re: Simple question: inserting data right after table creation (on migration?)

2012-12-16 Thread Theodore Petrosky
i have done my sql directly after the foreign key creation with this: ERXJDBCUtilities.executeUpdate(database.adaptorChannel(), "INSERT INTO brieflogo (iscurrent, logotitle) VALUES (true, 'AgencySacks')"); this way what ever sql I am creating directly relates to the migration at hand. Ted --

Re: D2W and ERAttachment

2012-12-16 Thread David Holt
http://wiki.wocommunity.org/display/documentation/ERModernLook Sent from my iPad On 2012-12-16, at 7:05 AM, Flavio Donadio wrote: > Hello, people! > > > Coding hung over on a sunday... Trying to use ERAttachment with a D2W app, > but I can't find a foolproof tutorial on the web. Drunken styl

Re: D2W and ERAttachment

2012-12-16 Thread James Cicenia
The properties file is your friend: Read this: http://jenkins.wocommunity.org/job/Wonder/lastSuccessfulBuild/javadoc/er/attachment/package-summary.html You would make a relationship from image to erattachment, set your properties correctly, and then set your rules for an upload component. On D

Re: Simple question: inserting data right after table creation (on migration?)

2012-12-16 Thread Flavio Donadio
Paul, Nice! I'll stick with that! Regards, Flavio On 16/12/2012, at 12:51, Paul Yu wrote: > Instead of running a second migration. > > What I do is this. At the end of the initial migration .java file, I have > this statement > > > ERXJDBCUtilities.executeUpdateScriptFromResourceName

Re: Simple question: inserting data right after table creation (on migration?)

2012-12-16 Thread James Cicenia
Correct, that is the point of the migrations. I do a much as I can in the 0 and 1 migration. Usually this means I fuss around a bit in the beginning always having to remember to change, eogenerate, refresh, add migration code, etc. But once at the 80% point, it becomes quite easy to just "install

D2W and ERAttachment

2012-12-16 Thread Flavio Donadio
Hello, people! Coding hung over on a sunday... Trying to use ERAttachment with a D2W app, but I can't find a foolproof tutorial on the web. Drunken style Google-fu at its best! I understand it should be really easy to use, but I can't quite understand what I have to do to use it. Just downloa

Re: Simple question: inserting data right after table creation (on migration?)

2012-12-16 Thread Flavio Donadio
James, Thanks for the suggestion! I see a problem with that... If I actually use migrations to modify the tables in future versions of the app, I would need to increment DateModel to DateModel every time. To be true, I don't intend on modifying this app after it's finished, but we never know

Re: Simple question: inserting data right after table creation (on migration?)

2012-12-16 Thread James Cicenia
I have always created a second migration file with SQL inserts. Haven't experienced any problems. DateModel0 ==> setup tables, etc. DateModel1 ==> bootstrap data sql inserts On Dec 16, 2012, at 8:23 AM, Flavio Donadio wrote: > Hello, people! > > > I think I already know the answer, but I n

Simple question: inserting data right after table creation (on migration?)

2012-12-16 Thread Flavio Donadio
Hello, people! I think I already know the answer, but I need to check first... I want to create a default user on my WO App when the app is first run. So, I need to create a User entity and insert it right after my tables are created, which is automatically done through a migration. Is it saf