Changes for page The EOModel

Last modified by Pascal Robert on 2012/03/10 15:42

From version 16.1
edited by Pascal Robert
on 2012/03/10 08:32
Change comment: There is no comment for this version
To version 13.1
edited by Pascal Robert
on 2012/03/10 15:42
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -347,10 +347,52 @@
347 347  
348 348  == EOGenerator ==
349 349  
350 +For many years, a tool called **EOGenerator** was used by many developers to use the Generation Gap Pattern on the Enterprise Objects. Since **EOGenerator** was using a ObjectiveC <-> Java that Apple killed in Mac OS X 10.5, a 100% Java tool, **Veogen**, was added to WOLips, so by default everyone is now using it.
351 +
352 +By using **Veogen**, when you create a new EO entity in your data model, two Java class will be generated, one called //EntityName.java, and the other EntityName.java. The class starting with the underscore will be regenerated every time you modify the entity in the model, if you want to change something in that class, you need to change the template. The class without the underscore is the place where you can add other variables or methods.//
353 +
350 350  == Handling Blob Data ==
351 351  
352 352  == Connection Dictionary ==
353 353  
358 +In each EOModel, you can store one or many database configurations. A database configuration consists of the prototype selection for your database (MySQL, H2, etc.), the adaptor (99% of the time, it's JDBC), the URL (JDBC connection string), the username and password to connect to the datastore, the driver (JDBC driver name) and the name of the EOAdaptor plugin. You need to have at least one database configuration in your model so that you can use database migrations and reverse engineer a database to a model.
359 +
360 +When you launch your application, it will use the default database configuration from the model. An alternative to database configuration is to use properties in the Properties file to specify the connection dictionary. For example, for a H2 database, you can use a configuration like this:
361 +
362 +{{panel}}
363 +
364 +dbConnectUserGLOBAL=
365 +dbConnectPasswordGLOBAL=
366 +dbConnectURLGLOBAL = jdbc:h2:file:~/politimo
367 +dbConnectPluginGLOBAL = H2PlugIn
368 +
369 +{{/panel}}
370 +
371 +Using the **GLOBAL** properties will apply the properties to all models in your application (and to models in your frameworks). You can also specify propertiers per model, with those properties:
372 +
373 +{{panel}}
374 +
375 +\[WO:MODEL_NAME\].DBDriver
376 +\[WO:MODEL_NAME\].DBHostName
377 +\[WO:MODEL_NAME\].DBPassword
378 +\[WO:MODEL_NAME\].DBPlugin
379 +\[WO:MODEL_NAME\].DBURL
380 +\[WO:MODEL_NAME\].DBUser
381 +
382 +{{/panel}}
383 +
384 +So if your EOModel is called **Politimo**, the properties will be:
385 +
386 +{{panel}}
387 +
388 +Politimo.DBDriver =
389 +Politimo.DBPassword =
390 +Politimo.DBPlugin = H2PlugIn
391 +Politimo.DBURL = jdbc:h2:file:~/politimo
392 +Politimo.DBUser =
393 +
394 +{{/panel}}
395 +
354 354  == Runtime Selection of the Connection Dictionary and Prototypes ==
355 355  
356 356  == Debugging JDBC Connections and Jdbc2info ==