• 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: creating tables on the fly with webobjects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: creating tables on the fly with webobjects


  • Subject: Re: creating tables on the fly with webobjects
  • From: Guido Neitzer <email@hidden>
  • Date: Fri, 22 Jun 2007 10:57:26 -0600

On 22.06.2007, at 10:18, .::welemski::. wrote:

Yes, During runtime of my application. I want to have an webobjects application that whenever a new user is registered, a new table will be created only for him.

If anyone tried it before please post your solution here.

There are two problems to solve:

You have to create an entity on the fly if you want to use the table with "normal" WebObjects functions and you have to create the table.

Jacky pointed out a way to create the tables (schema generation) and to create the entity you do something like that (copied from ERXJDBCMigrationLock):

EOEntity dbUpdaterEntity = new EOEntity();
dbUpdaterEntity.setExternalName(_dbUpdaterTableName);
dbUpdaterEntity.setName(_dbUpdaterTableName);
dbUpdaterModel.addEntity(dbUpdaterEntity);

EOAttribute modelNameAttribute = new EOAttribute();
modelNameAttribute.setName("modelName");
modelNameAttribute.setColumnName("modelname");
modelNameAttribute.setClassName("java.lang.String");
modelNameAttribute.setWidth(100);
modelNameAttribute.setAllowsNull(false);

The remaining task now is to get that into the application everytime the application starts up. If you really want to do that: it might be easy, but the whole concept looks so so dirty to me, I don't even want to think about it.

cug
_______________________________________________
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: creating tables on the fly with webobjects
      • From: ".::welemski::." <email@hidden>
References: 
 >creating tables on the fly with webobjects (From: ".::welemski::." <email@hidden>)
 >Re: creating tables on the fly with webobjects (From: ".::welemski::." <email@hidden>)

  • Prev by Date: Re: HTML comments and WebObjects
  • Next by Date: Re: WOPopUpButton
  • Previous by thread: Re: creating tables on the fly with webobjects
  • Next by thread: Re: creating tables on the fly with webobjects
  • Index(es):
    • Date
    • Thread