[JBoss JIRA] (FORGE-873) Scaffold don't shows the correct referenced entities in edit views, while in details views show something like "org.forgetest.model.Entity@5f9ba38e"
by claudio perrotta (JIRA)
claudio perrotta created FORGE-873:
--------------------------------------
Summary: Scaffold don't shows the correct referenced entities in edit views, while in details views show something like "org.forgetest.model.Entity@5f9ba38e"
Key: FORGE-873
URL: https://issues.jboss.org/browse/FORGE-873
Project: Forge
Issue Type: Bug
Components: Scaffold
Affects Versions: 1.2.3.Final
Environment: JBoss 7.1.1 …
[View More]final , Hibernate 4.2.0.final,
Reporter: claudio perrotta
For a table with a foreign key the UI permits to select the possible values, but this values are listed in a dropdown menu in a form like "org.forgetest.model.Entity@5f9ba38e" (would be preferable that the string present be relative to the PK referenced)
Anyway, after setting this field and submitting the form, the data are inserted in the table correctly but when i want to modify the record, the UI doesn't show the setted value for the foreign key and i must set it again before saving.
--
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
[View Less]
11 years, 11 months
[JBoss JIRA] (FORGE-572) Forge scaffold faces creates view beans with Id always Long against user-generated Entities
by Vineet Reynolds (JIRA)
[ https://issues.jboss.org/browse/FORGE-572?page=com.atlassian.jira.plugin.... ]
Vineet Reynolds commented on FORGE-572:
---------------------------------------
Claudio, the reason for closing this bug is more down to the scope. I'd prefer limiting the scope of this to any bug involving the generation of long-typed Id fields in the view beans.
As far as your issues are concerned, your first issue is tracked at FORGE-870, and has been resolved. It should be available in the next release.
I …
[View More]couldn't quite understand the second one. Could you raise a new bug, with possibly a test case to reproduce it?
As for #3, I believe FORGE-871 would describe it perfectly. The fix should also be available in the next release.
Thanks.
> Forge scaffold faces creates view beans with Id always Long against user-generated Entities
> -------------------------------------------------------------------------------------------
>
> Key: FORGE-572
> URL: https://issues.jboss.org/browse/FORGE-572
> Project: Forge
> Issue Type: Bug
> Components: Scaffold
> Affects Versions: 1.0.2.Final
> Environment: JBoss Developer Studio 5 Beta 2, Embedded Forge 1.0.2.Final
> Reporter: Will Dinyes
> Assignee: Vineet Reynolds
> Priority: Minor
> Labels: starter
> Fix For: 1.2.4.Final
>
>
> When running:
> scaffold from-entity ~.domain.* --overwrite
> The generated view Bean will always use an id field as a long, even if the entity uses a different type for the @Id. For instance, this code, in an Entity class called ValMealtype:
> @Id
> @GeneratedValue(strategy=GenerationType.IDENTITY)
> @Column(unique=true, nullable=false, length=20)
> private String meal;
> Generates, in ValMealtypeBean:
> private Long id;
> <-- associated gettters and setters -->
> And, later in the class:
> return ValMealtypeBean.this.entityManager.find(ValMealtype.class, Long.valueOf(value));
> That line in particular doesn't work at all, of course, since a Long can't be parsed out of a non-numeric String. I suppose I could name my meals with hex digits . . . CAFE . . . BEEF . . . but sadly, Chicken isn't going to fly.
> Basically, scaffold probably needs to look at the type of @Id in the entity and use that to set the id field type in the generated bean.
> As this is reported against a non-current release, I understand it may be fixed already. In this case, a new Beta of JBDS 5 is probably in order, as that's where I'm seeing this issue.
--
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
[View Less]
11 years, 11 months
[JBoss JIRA] (FORGE-870) Faces scaffold does not generate form fields for @Id fields not annotated with @GeneratedValue
by Vineet Reynolds (JIRA)
[ https://issues.jboss.org/browse/FORGE-870?page=com.atlassian.jira.plugin.... ]
Vineet Reynolds updated FORGE-870:
----------------------------------
Affects Version/s: 1.2.3.Final
> Faces scaffold does not generate form fields for @Id fields not annotated with @GeneratedValue
> ----------------------------------------------------------------------------------------------
>
> Key: FORGE-870
> URL: https://issues.jboss.org/browse/FORGE-…
[View More]870
> Project: Forge
> Issue Type: Bug
> Components: Scaffold
> Affects Versions: 1.2.3.Final
> Reporter: Vineet Reynolds
> Assignee: Vineet Reynolds
> Fix For: 1.2.4.Final
>
>
> The Faces scaffold does not generate any form fields for @Id annotated fields. This is because the Metawidget JPAInspector used by the scaffold plugin is configured to hide Ids.
> This should however be done conditionally, when the @Id field is also annotated with a @GeneratedValue, since attempting to create a new entity instance without a provided id, results in the following error being displayed:
> {noformat}org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(){noformat}
--
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
[View Less]
11 years, 11 months