[
https://jira.jboss.org/jira/browse/JBIDE-5052?page=com.atlassian.jira.plu...
]
Vitali Yemialyanchyk commented on JBIDE-5052:
---------------------------------------------
Dima, I check you fix. It is seems to use "identity" name as id candidate is a
wrong solution...
For my opinion, by the sence of the word "identity" is not "id", so
this variable should be selected as "id" by some other criteria, not by it's
name.
I reopen issue. We should try to find better workaround for this...
My thoughts about the problem and about possible fix:
1) there are a lot of sutuations when we can't generate correct hbm.xml (example user
select wrong class which is not entity);
2) currently we generate hbm.xml files which could be wrong at all - this will surprise
the user cause he expected correct hbm.xml in any case;
3) if we can't generate correct hbm.xml - we could a) SHOW WARNING (with explanation
why he will get incorrect hbm.xml) to user (so user will get at list expected result with
incorrect hbm.xml) and/or proposition to select correct id candidate
for me this (3) look like correct workaroun situation, current fix looks bad...
Wrong generation of Hibernate XML mapping file.
-----------------------------------------------
Key: JBIDE-5052
URL:
https://jira.jboss.org/jira/browse/JBIDE-5052
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: Hibernate
Affects Versions: 3.1.0.M4
Environment: WindowsXP SP2
JBoss Tools
Version: 3.1.0.M4
eclipse-SDK-3.5RC3-win32.zip
Build id: JBossTools-Update-3.1.0.M4
JRE 1.5_08
Reporter: Aliaksey Nis
Assignee: Aliaksey Nis
Fix For: 3.1.0.CR1
EXECUTE: Create Seam 2FP EAR project.
EXECUTE: New > Hibernate XML Mapping file.
EXECUTE: Select authentificator class and add it.
EXECUTE: Press Finish.
FAILURE: Error appears in generated file.
"The content of element type "class" must match
"(meta*,subselect?,cache?,synchronize*,comment?,tuplizer*,(id|composite-id),discriminator?,natural-id?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*,resultset*,(query|sql-query)*)"."
On element: Authenticator.hbm.xml
In folder: seamEar-ejb/ejbModule/org/domain/seamear/session
Location: line 6
Vitaly said that in this generated file class id is missed. So there is an mistake in
generator.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira