Home » Eclipse Projects » Dali » Generate Entities from Tables not working
| | | | | | | | | | | | |
Re: Generate Entities from Tables not working [message #618858 is a reply to message #435461] |
Tue, 16 February 2010 14:17 |
Guillermo Aldunate Messages: 15 Registered: February 2010 |
Junior Member |
|
|
I reported this problem with the Galileo version to DTP around 6 months ago. At that time there were a lot of bugs outstanding for SQL Server and DTP, and all I got was that DTP team was lacking manpower to solve this problem, so they would fix it presumably in the 1.7.2 version.
Now I realise this is more a Dali matter than DTP's. However, the problem continues, no matter I'm using SR1 release of Galileo and Dali Java Persistence Tools 2.2.1.v200908270220. In fact, using jTDS one may even list the schemas in the SQL Server database and create the entities, but the Java output is surrounded by quotes in the bean's variables names, who have also escape backslash characters, and thus the code generated is quite useless and little legible.
If you use the standard SQL Server JDBC you don't get lists of schemas or anything else. My SQL Server version is 2000 (quite old); if you substitute the JDBC driver for that belonging to SQL Server 2005, the only schema you get is your own, for SQL Server 2005 began using schemas rather than user names for this function.
So, this seems to be a generalised problem. On Ganymede Dali version, it works fine with either the MSSQL 2000 or jTDS JDBC drivers.
Please fix this asap, for I cannot migrate to Galileo and thus I have no support for using Facelets in my code, which I really want to use for it will ease my job greatly!!! Thanks in advance.
|
|
|
Re: Generate Entities from Tables not working [message #618859 is a reply to message #618858] |
Thu, 25 February 2010 20:13 |
Brian Vosburgh Messages: 137 Registered: July 2009 |
Senior Member |
|
|
Guillermo,
I'm not sure I understand your problem exactly.
When you create your DTP Connection Profile, what Connection Profile Type do you use? SQL Server?
Once you have created your Connection Profile and connected to your database server, do you see your databases and tables in the DTP Data Source Explorer?
Have you changed your project default catalog and schema (via the Project Properties dialog -> Java Persistence)? Are any catalogs or schemata listed in the drop-down lists in the Connection section of the Java Persistence properties page? The list of catalogs on this page should match the databases listed in the Data Source Explorer. (I'm not sure where the schemata can be found via DTP....)
Minus any bugs, Dali is simply displaying the catalogs and schemata provided by DTP. This is problematic because of the variety of DTP driver implementations.
Unfortunately, I don't have a MS SQL Server to test against; but I do have a Sybase Adaptive Server (which is very similar), and I can see the catalogs and schemata fine with that release of Dali.
Also, the reason you are seeing quoted identifiers when using jTDS is probably because Dali does not recognize the name of the vendor returned by DTP in that situation. Which DTP Connection Profile Type do you use? Are you using lowercase letters in your table and column names? By default, if Dali does not recognize the vendor, it will treat names according to the SQL Standard, which expects non-delimited identifiers to be folded to uppercase. As a result, any non-uppercase identifiers must be delimited.
Brian
|
|
|
Re: Generate Entities from Tables not working [message #619278 is a reply to message #618858] |
Tue, 08 June 2010 20:25 |
Guillermo Aldunate Messages: 15 Registered: February 2010 |
Junior Member |
|
|
Guillermo Aldunate wrote on Tue, 16 February 2010 09:17
> I reported this problem with the Galileo version to DTP around 6 months ago. At that time there were a lot of bugs outstanding for SQL Server and DTP, and all I got was that DTP team was lacking manpower to solve this problem, so they would fix it presumably in the 1.7.2 version.
>
> Now I realise this is more a Dali matter than DTP's. However, the problem continues, no matter I'm using SR1 release of Galileo and Dali Java Persistence Tools 2.2.1.v200908270220. In fact, using jTDS one may even list the schemas in the SQL Server database and create the entities, but the Java output is surrounded by quotes in the bean's variables names, who have also escape backslash characters, and thus the code generated is quite useless and little legible.
>
> If you use the standard SQL Server JDBC you don't get lists of schemas or anything else. My SQL Server version is 2000 (quite old); if you substitute the JDBC driver for that belonging to SQL Server 2005, the only schema you get is your own, for SQL Server 2005 began using schemas rather than user names for this function.
>
> So, this seems to be a generalised problem. On Ganymede Dali version, it works fine with either the MSSQL 2000 or jTDS JDBC drivers.
>
> Please fix this asap, for I cannot migrate to Galileo and thus I have no support for using Facelets in my code, which I really want to use for it will ease my job greatly!!! Thanks in advance.
|
|
|
Re: Generate Entities from Tables not working [message #619281 is a reply to message #618858] |
Tue, 08 June 2010 20:26 |
Guillermo Aldunate Messages: 15 Registered: February 2010 |
Junior Member |
|
|
Guillermo Aldunate wrote on Tue, 16 February 2010 09:17
> I reported this problem with the Galileo version to DTP around 6 months ago. At that time there were a lot of bugs outstanding for SQL Server and DTP, and all I got was that DTP team was lacking manpower to solve this problem, so they would fix it presumably in the 1.7.2 version.
>
> Now I realise this is more a Dali matter than DTP's. However, the problem continues, no matter I'm using SR1 release of Galileo and Dali Java Persistence Tools 2.2.1.v200908270220. In fact, using jTDS one may even list the schemas in the SQL Server database and create the entities, but the Java output is surrounded by quotes in the bean's variables names, who have also escape backslash characters, and thus the code generated is quite useless and little legible.
>
> If you use the standard SQL Server JDBC you don't get lists of schemas or anything else. My SQL Server version is 2000 (quite old); if you substitute the JDBC driver for that belonging to SQL Server 2005, the only schema you get is your own, for SQL Server 2005 began using schemas rather than user names for this function.
>
> So, this seems to be a generalised problem. On Ganymede Dali version, it works fine with either the MSSQL 2000 or jTDS JDBC drivers.
>
> Please fix this asap, for I cannot migrate to Galileo and thus I have no support for using Facelets in my code, which I really want to use for it will ease my job greatly!!! Thanks in advance.
|
|
|
Re: Generate Entities from Tables not working [message #619284 is a reply to message #618859] |
Tue, 08 June 2010 20:46 |
Guillermo Aldunate Messages: 15 Registered: February 2010 |
Junior Member |
|
|
Hello Brian, sorry but I didn't get your answer before. All I can say is things haven't improved regarding SQL Server 2000 and DTP.I "upgraded" to Galileo 3.5SR2 and it continues not to work. When you define a connection using MS SQL Server (with the same JDBC drivers and definitions I use with Eclipse 3.4.2, or Ganymede, which works fine), you may not see any tables other than those defined under your user defined under SQL Server.
It's funny, because in the meantime I developed an application using IBM DB2 LUW (that supports schemas and all those gadgets a true relational database should support) and it is working fine. I had no problems whatsoever to recognise and work with all sorts of database objects.
It seems to me that between the 2000 and 2005 versions of MS SQL Server there was a change in the way the schemas were addressed. Whereas in the 2000 version there were no schemas (only users), in 2005 and newer versions the schema facility was implemented (in fact, if you use the JDBC driver for 2005 with 2000 in Ganymede, it will work but it will give you the same problem I'm reporting here, which is equivalent to say that it doesn't work).
If you use the jTDS driver with both Ganymede and Galileo, you get exactly the same behaviour as with MS SQL Server 2000 JDBC driver.
Please reopen this issue and try to solve it for we are still using Ganymede and it lacks many features from Galileo we would like to have available.
Best regards, Guillermo :evil:
|
|
| |
Re: Generate Entities from Tables not working [message #638122 is a reply to message #619286] |
Wed, 10 November 2010 01:46 |
Guillermo Aldunate Messages: 15 Registered: February 2010 |
Junior Member |
|
|
Hello, it's me again. This time I have moved to Helios, and things are even worse. I can access SQL Server tables via logging in with my user in the SQL Server manager, and connect to every application using the database. As it was before, if I configure the SQL Server JDBC driver under Ganymede (Eclipse 3.4.2), everything works fine and I can see all users (say schemas) that the database has defined. I even downloaded JDBC driver 3.0 and it works fine under Ganymede, as it does jTDS and also the good old MS SQL Server 2000 driver.
But when trying to do the same thing under Eclipse 3.6 (Helios) JPA, there's no way to make it work. You can see a schema with your user name and nothing else. I would need to see dbo schema, and it doesn't work. No matter you may specify the schema name under the Java Persistence facet; it doesn't work.
I believe this problem has been around for too long, and it impairs the ability to develop applications with Eclipse. Since the same problem happens when trying to configure a database connection via the Database Development perspective, I shall infer that the problem is DTP and not Dali. The question is ¿why it does work well under Ganymede DTP and not under Helios DTP? (by the way, it didn't work either under Galileo DTP...)
Thanks in advance, Guillermo
|
|
| | |
Re: Generate Entities from Tables not working [message #639988 is a reply to message #638855] |
Thu, 18 November 2010 15:44 |
Guillermo Aldunate Messages: 15 Registered: February 2010 |
Junior Member |
|
|
Hello Neil. My puzzling only increases at this time. I defined a new connection using the Open Source MS SQL Server driver jTDS under Helios, connected to the DBM using the Data Source Explorer, and everything worked OK. I could see all schemas (say, users, because it's SQL Server 2000), and Dali would let me select both database and schema, what I had done before with no success with the same configuration!!!
However, when trying to use Microsoft JDBC driver (in both the native SQL Server 2000 version or the JDBC 3.0 version), the problem is still the same as described.
Please note that in the attached MS Word file, the images were from Eclipse Helios using jTDS driver. So it didn't work well from the beginning.
The point is, I don't know for how long this will continue to work well. Also, there's no way of making the MS drivers work, since they show the same behaviour than before.
Please contact me should you need any further information or some action to be performed by me. Thank you very much for your reply.
|
|
|
Goto Forum:
Current Time: Fri Apr 26 14:59:47 GMT 2024
Powered by FUDForum. Page generated in 0.06327 seconds
|