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      (Webobjects-dev@lists.apple.com)
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