I've noticed that you have also posted this question over here on the WaveMaker forums.
I have now tested WaveMaker 6.5.1 against SQL Anywhere 22.214.171.12497 with the 'Demo' database, via jConnect 7.0.7 ESD #4, with Glenn Paulley's Hibernate 'SQLAnywhere11Dialect' and have not seen this behaviour - the primary keys are listed correctly, with the correct foreign key mappings.
Here are the steps I needed to use in order to import the SQL Anywhere 12 "demo" database into WaveMaker successfully:
- Install VMWare WaveMaker 6.5.1
- Download jConnect 7.07 ESD #4
- Download the SQLAnywhere 11 Hibernate Dialect (Compatible with version 12 -- note that we are still looking into releasing an updated Hibernate dialect for SQL Anywhere 12 as per the other thread)
SQLAnywhereDialect.jar to the WaveMaker
\studio\WEB-INF\lib program sub-directory (e.g.
- Start the sample database: Programs > SQL Anywhere 12 > SQL Anywhere > Network Server Sample
- [Note: These next two steps are required because the SQL Anywhere 'demo' database has duplicated names for foreign-key relationships, which isn't allowed while importing into WaveMaker when using the
DefaultRevengNamingStrategy] Connect to the 'demo' database using Interactive SQL:
dbisql -c "UID=dba;PWD=sql;DSN=SQL Anywhere 12 Demo"
Run the following SQL code against the demo database:
ALTER FOREIGN KEY "FK_CustomerID_ID" ON "GROUPO"."SalesOrders" RENAME TO "FK_SO_CustomerID_ID";
ALTER FOREIGN KEY "FK_CustomerID_ID" ON "GROUPO"."Contacts" RENAME TO "FK_C_CustomerID_ID";
ALTER FOREIGN KEY "FK_ProductID_ID" ON "GROUPO"."MarketingInformation" RENAME TO "FK_MI_ProductID_ID";
ALTER FOREIGN KEY "FK_ProductID_ID" ON "GROUPO"."SalesOrderItems" RENAME TO "FK_SOI_ProductID_ID";
You can now import the demo database into WaveMaker:
- Start WaveMaker
- Services > Import Database
- Database System: Other
- Host: localhost
- Username: dba
- Password: sql
- Database: demo
- Service Name: demoDB
- Connection URL: jdbc:sybase:Tds:localhost:2638
- Java Package: com.demodb
- Driver Class: com.sybase.jdbc4.jdbc.SybDriver
- Dialect: org.hibernate.dialect.SQLAnywhere11Dialect
- Naming Strategy: com.wavemaker.tools.data.reveng.DefaultRevengNamingStrategy
Here are the rest of my general notes while working with SQL Anywhere / WaveMaker:
- The Type-2 native SQL Anywhere JDBC driver will NOT work with Wavemaker (See the WaveMaker 'UntooledDatabase' reference here and the requirement for a Type-3/Type-4 driver), and I would imagine attempting to deploy the non-native JDBC component to devices would be extremely difficult (and not supported for all deployment platforms). You will likely see this error described here instead when attempting this.
- There are some old newsgroup threads about this behaviour where I had done some experimentation with WaveMaker 3.x and SQL Anywhere 10. Thankfully, almost all of the workarounds that I had previously detailed are no longer required when working with current versions of the SQL Anywhere software
- There are some threads in the WaveMaker community forums about working with SQL Anywhere also
There was an issue I had described previously with how jConnect named primary keys back to a JDBC application incorrectly - this previously required a fix to the jConnect catalog in SQL Anywhere. When encountering this error, WaveMaker would fail the import with: Error:
[Import failed : Duplicate names found for primarykey.] This was fixed in CR #631443, and is present in versions jConnect 7.0 ESD #7 and up.
- The "demo" database that ships with SQL Anywhere has foreign key relationships that are given the same name (and are required to be renamed, as shown above). I have requested to change this requirement in the future via CR #725184, to be implemented in a future version of SQL Anywhere. If you have a similar situation in your database, you may have to create a new Naming Strategy to add a unique identifier to each object (prepend the table name, for instance).
I hope that helps!
22 Nov '12, 15:22