• 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: Wonder prototypes docs ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Wonder prototypes docs ?


  • Subject: Re: Wonder prototypes docs ?
  • From: Ramsey Lee Gurley <email@hidden>
  • Date: Wed, 03 Dec 2008 13:52:48 -0500

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";
        }

}
}

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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:
    • SOLVED: Mysql Prototypes exception
      • From: Simon McLean <email@hidden>
References: 
 >Re: Wonder prototypes docs ? (From: Simon McLean <email@hidden>)

  • Prev by Date: Where is the deadlock culprit?
  • Next by Date: Re: Where is the deadlock culprit?
  • Previous by thread: Re: Wonder prototypes docs ?
  • Next by thread: SOLVED: Mysql Prototypes exception
  • Index(es):
    • Date
    • Thread