Hi All -
I've fixed it. I know what I did, but I have no idea why it fixed it.
I downloaded the latest Wonder source and imported it as projects into
eclipse. Because of the new classpathsex (and boy is that stuff
good :-)) i had to upgrade wolips to the latest nightly. clean
everything, rebuild, and hey presto it now works out the box.
So, as I said, I have no idea what was wrong before, or why it now
"just works", but something in all those updates just fixed it.
Many thanks to Ramsey & Mike for helping me out.
Simon
On 3 Dec 2008, at 18:52, Ramsey Lee Gurley wrote:
On Dec 3, 2008, at 4:49 AM, Simon McLean wrote:
As far as how Wonder uses prototypes differently, Wonder (and now
5.4) have vendor-specific prototypes, meaning you can define
EOJDBCFrontBasePrototypes (or is it EOFrontBaseJDBCPrototypes ...
I never remember) and Entity Modeler and the runtime will
automatically "do the right thing" with those.
I think this is what is not happening for me. Entity Modeler
appears to work fine (subbing in the attribute configuration when i
select a prototype definition) but at runtime the model appears to
use EOJDBCPrototypes rather than EOJDBCMySQLPrototypes.
I'm guessing therefore I've just not got something "switched on" -
are there any wonder properties that need to be switched on ? I
thought i was just case of building the ERPrototypes framework,
hooking it up to the project, then specifying the prototypes to use
in the connection dictionary (or via
ModelName.EOPrototypesEntity=EOJDBCMySQLPrototypes when configuring
the connection dictionary via properties).
Is that about right ? Are there any properties that need
adjusting ? How about these ones:
er.extensions.ERXModelGroup.prototypeModelNames
er.extensions.ERXModelGroup.flattenPrototypes
er.extensions.ERXModelGroup.patchModelsOnLoad
I'm just checking out the wonder source so i can stick some
breakpoints in the the ERXModelGroup to try and figure out why it's
not loading properly...
Thanks, Simon
I've never actually had to set any properties to make prototypes
work for MySQL here. Perhaps you should try commenting them all out
and only using what is in the eomodel file itself? (typos?) Perhaps
you've tried that already...
Now that I've started playing with ERAttachment though, I need to
use migrations, meaning I needed to set some properties... Those
appear to need to match what are in the eomodel to work though.
Currently I have
# Connection Dictionary
dbConnectURLGLOBAL=jdbc:mysql://localhost/Example?
capitalizeTypenames
=true&zeroDateTimeBehavior=convertToNull&characterEncoding=UTF-8
dbConnectUserGLOBAL=username
dbConnectPasswordGLOBAL=password
dbEOPrototypesEntityGLOBAL=EOJDBCMySQLPrototypes
dbConnectDriverGLOBAL=com.mysql.jdbc.Driver
dbConnectPluginGLOBAL=com.example.db.MySQLPlugIn
My plugin is a minimal piece of code right now just to get
migrations working with ERAttachment on MySQL for testing. I hope
to improve it/contribute it to Wonder when I get the time.
Migrations really won't work on MySQL without some improvement on
the plugin though...
package com.example.db;
import com.webobjects.eoaccess.EOAdaptor;
import
com
.webobjects.eoaccess.synchronization.EOSchemaSynchronizationFactory;
import com.webobjects.jdbcadaptor.JDBCAdaptor;
public class MySQLPlugIn extends
com.webobjects.jdbcadaptor.MySQLPlugIn {
public MySQLPlugIn(JDBCAdaptor adaptor) {
super(adaptor);
}
public EOSchemaSynchronizationFactory
createSchemaSynchronizationFactory() {
return new MySQLSynchronizationFactory(_adaptor);
}
public class MySQLSynchronizationFactory extends
com.webobjects.jdbcadaptor.MySQLPlugIn.MySQLSynchronizationFactory {
public MySQLSynchronizationFactory(EOAdaptor adaptor) {
super(adaptor);
}
public String _alterPhraseInsertionClausePrefixAtIndex(int
columnIndex) {
return "ADD";
}
}
}
_______________________________________________
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]