I'm not sure if its the best way, but you can try something like this :

                ...

                EOEntity entity = 
EOModelGroup.defaultGroup().entityNamed(entityName);
EODatabaseContext dc = EOUtilities.databaseContextForModelNamed(ec, modelName);
                EOAdaptor adaptor = dc.adaptorContext().adaptor();
EOSchemaGeneration synchronizationFactory = adaptor.synchronizationFactory();
                NSArray entityGroup = new NSArray(entity);
                
NSArray statements = synchronizationFactory.createTableStatementsForEntityGroup(entityGroup);
                
                ... for each statement
                                ... call evaluateExpression with the adaptor 
channel
        
                ...

                // if you want to set your primary key  
statements = synchronizationFactory.primaryKeyConstraintStatementsForEntityGroup (entityGroup);
                
                ... call evaluateExpression for each statement ...

                ...




On 07-06-22, at 12:07, .::welemski::. wrote:

Hi lists,

Is it possible to create tables on the fly with webobjects? or should i use pure SQL statements?
If anyone has a good tutorial on doing this please post it here.

Thank you.

--
 -- -- -- -- -- -- -- -- -- -- --
          welemski
 -- -- -- -- -- -- -- -- -- -- --
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/jgagnon% 40druide.com

This email sent to [EMAIL PROTECTED]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to