[JBoss JIRA] (JBIDE-12637) Hibernate Tools generates @SequenceGenerator with not unique name
by Nicolas Bihan (JIRA)
Nicolas Bihan created JBIDE-12637:
-------------------------------------
Summary: Hibernate Tools generates @SequenceGenerator with not unique name
Key: JBIDE-12637
URL: https://issues.jboss.org/browse/JBIDE-12637
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: hibernate
Affects Versions: 4.0.0.Alpha1
Reporter: Nicolas Bihan
Assignee: Dmitry Geraskov
Priority: Blocker
When generating entities with EJB3 annotations with a strategy set to "sequence", Hibernate tools generates POJOs with non unique javax.persistence.SequenceGenerator name "generator". But according to the Java documentation :
bq. String name (Required) A unique generator name that can be referenced by one or more classes to be the generator for primary key values.
See [javadoc|http://docs.oracle.com/javaee/5/api/javax/persistence/SequenceGen...]
Exemple of generated code with 4.0.0 Alpha1:
{code}
@SequenceGenerator(name = "generator", sequenceName = "S_CLIENT")
@Id
@GeneratedValue(strategy = SEQUENCE, generator = "generator")
@Column(name = "CLIENT_ID", unique = true, nullable = false, precision = 22, scale = 0)
public long getClientId() {
return this.clientId;
}
{code}
[Source code|https://github.com/hibernate/hibernate-tools/blob/master/src/java/or...] can be seen here.
So looks like the //TODO comment is right and it should generate a unique name atribute. sequencename+"generator" would be a good name.
It would even be better if we could define this name in reveng.xml or/and in a DelegatingReverseEngineeringStrategy class.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 4 months
[JBoss JIRA] (JBIDE-11975) JPA Tooling - Adding JPA Annotations to a POJO - Allow users to choose the field to be marked as PK
by Vimal Kansal (JIRA)
Vimal Kansal created JBIDE-11975:
------------------------------------
Summary: JPA Tooling - Adding JPA Annotations to a POJO - Allow users to choose the field to be marked as PK
Key: JBIDE-11975
URL: https://issues.jboss.org/browse/JBIDE-11975
Project: Tools (JBoss Tools)
Issue Type: Feature Request
Reporter: Vimal Kansal
Hi,
I am using JBDS 5.0 Beta 3. I created a POJO with follwoing attributes :
String username;
String password
String loginCount;
Then I invoked conetxt menu option "Generate Hibernate/JPA annotations", it generates only @Entity annotation. Obviously there is no way for the wizard to find out which attribute should act as PK. However if I include a string "id" anywhere in "username" e.g idusername, usernameid, useridname, it assumes it to be the PK and generates @Id and @GeneratedValue annotation. I wonder if this is by design? I think a better approach would be to let the user choose on the wizard, which field he wants to mark as PK.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 4 months
[JBoss JIRA] (JBIDE-13018) Forge: "Link with Editor" does not work correctly for multi-module maven projects
by Lukáš Fryč (JIRA)
Lukáš Fryč created JBIDE-13018:
----------------------------------
Summary: Forge: "Link with Editor" does not work correctly for multi-module maven projects
Key: JBIDE-13018
URL: https://issues.jboss.org/browse/JBIDE-13018
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: forge
Affects Versions: 3.3.1
Reporter: Lukáš Fryč
Assignee: Koen Aers
Attachments: forge-link-to-editor.png
When I turn on "Link with Editor" in Forge console,
and start to switch between Java files, new editor is opened.
See attached screenshot.
Note that the editors differs in the file path opened for {{TestFocusManager.java}}:
* first: {{ui/src/test/java/...}}
* second: {{components/misc/ui/src/test/java/...}}
----
It's because detected files use wrong project as base.
There are several projects in a structure:
{code}
components/pom.xml
components/misc/pom.xml
components/misc/ui/pom.xml
{code}
The Forge console detects right one (the most nested): {{[richfaces-ui-misc-ui] TestFocusManager.java $ }}
But "Link to Editor" uses {{components/}} as a base.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 4 months
[JBoss JIRA] (JBIDE-13016) Show In > Forge doesn't navigate Forge CLI to file when run from file editor
by Lukáš Fryč (JIRA)
Lukáš Fryč created JBIDE-13016:
----------------------------------
Summary: Show In > Forge doesn't navigate Forge CLI to file when run from file editor
Key: JBIDE-13016
URL: https://issues.jboss.org/browse/JBIDE-13016
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: forge
Affects Versions: 3.3.1
Reporter: Lukáš Fryč
Assignee: Koen Aers
I have opened type {{Test.java}} in the Java editor.
When I open context menu in the Java editor and select {{Shown In > Forge Console}}, Forge CLI obtains focus, but it does not navigate to given type.
(Note: when I do the same from Package Explorer, it works fine).
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 4 months