- This topic has 8 replies, 2 voices, and was last updated 13 years, 6 months ago by
support-tony.
-
AuthorPosts
-
yuri911qqMemberSystem: OS X 10.7 LION
MyEclipse version : for spring 9.1
problem: in sql editor, can’t execute selected text
can’t execute from right-click menu (eclipse has that option)
the default shortcut is option+X which conflicts with default mac os symbol “√”
i know i can change the shortcut settings, but eclipse doesn’t have that problemalso, the hibernate reverse engineering can not detect many-to-many/one relation in os x, works fine in windows
support-tonyKeymasteryuri911qq,
Thanks for pointing these problems out. There is a problem generally with shortcuts in the SQL editor, and I’ve raised a bug report for it.
I’ve also raised an enhancement request to add a Run SQL context menu item. Note that there is such a menu item in the Visual SQL Query Editor.
Could you explain what you mean when you say that eclipse doesn’t have these problems? Are you referring to a specific eclipse package or a specific eclipse plug-in?
I can’t replicate your problem with the many-one detection. Did you select the “Enable many-to-many detection” option? I used the builtin Derby database, CLASSICCARS schema and the reverse engineering detected the payment-customer relationship. Could you try that?
yuri911qqMemberthanks for the reply
–eclipse doesn’t have these problems
the normal eclipse from http://www.eclipse.org doesn’t have that problem, when i press option + x, it just executes the selected text,
–many-one detection
I used mysql, and selected the “enable many-to-many detection” option
exactly the same steps as it was in windowsin fact, this bug has been reported before
http://www.myeclipseide.com/PNphpBB2-viewtopic-t-24380-start-15.htmltry mysql and see
cheers
support-tonyKeymasterI can’t find a standard eclipse shortcut that executes the selected text. The classic eclipse distribution doesn’t support SQL. Which editor are you executing the text in? Perhaps you could attach a screenshot of the Keys preferences, showing the shortcut you mentioned.
There is a problem with other DB tools on the Mac, when trying to follow foreign keys, where the primary keys have been set up a certain way in MySql. We had a separate problem (not Hibernate) that has a workaround. If you are creating primary keys in this way:
create table test(id integer, name varchar(32), primary key (id));
try, if possible, using this method, instead:
create table test(id integer primary key, name varchar(32));
I will check the problem is the same with hibernate reverse engineering and MySql.
yuri911qqMember>> The classic eclipse distribution doesn’t support SQL.
I use eclispe 3.7 for JAVA EE, the default sql file editor>>try, if possible, using this method, instead:
i did, still no luckAttachments:
You must be logged in to view attached files.
support-tonyKeymasteryuri911qq,
Thanks for that. I’ve now tried the hibernate reverse engineering on Mac, with MySQL, and I’ve replicated the issue. Strangely, the problem is the opposite of the other problem I mentioned. If the primary keys are defined in the first way mentioned, generating an ER diagram doesn’t detect the relationship but using Hibernate reverse engineering does detect the relationship. If the primary keys are defined the second way, an ER generated diagram does detect the relationship but Hibernate reverse engineering doesn’t.
I’ll raise a separate bug for this but, if you don’t have a need for ER diagrams, a workaround is to define the primary keys using the first method mentioned in my last comment, if it’s possible for you to do that.
I’ve also seen that the eclipse JEE tools do honor the shortcut override. I’ll add information to the bug I raised earlier.
Sorry for the problems and thanks for reporting this.
yuri911qqMemberthank you
expecting hot fix
is this going to be a small patch or do i have to wait for the 9.2 release?
support-tonyKeymasteryuri,
The development team are looking at the MySQL issue and will try to get a fix into Release 10 (due within the next few weeks). However, we can’t guarantee a particular time or release, unfortunately.
Can you work around the issue for now, either by using Windows or by using the other method of defining primary keys?
support-tonyKeymasterYuri,
The other problem I mentioned turned out to be a problem with inconsistent use of uppercase and lowercase table names in the DDL. This lead to a couple of potential workarounds.
The first is to use lowercase table names in all DDL for defining tables. This worked for both your problem and another problem we had.
The second is to set a flag to turn off case sensitivity for table names. The technique can be seen in one of the comments in this MySQL bug entry. Look for the entry from Harald Neiss. In effect, this makes all table names lowercase, regardless of the actual case used in the DDL.
The other problem we had was fixed by being consistent with uppercase or lowercase table names but only lowercase seems to fix the hibernate reverse engineering problem. If this is not acceptable, you might try raising a bug against MySQL, as we can find no problem with the code here.
-
AuthorPosts