[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 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
11 years, 7 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 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
11 years, 7 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-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
11 years, 7 months
[JBoss JIRA] (FORGE-872) Faces scaffold generates incorrect EL expressions for expansions of @Embedded entities and 1:1 relationships
by Vineet Reynolds (JIRA)
Vineet Reynolds created FORGE-872:
-------------------------------------
Summary: Faces scaffold generates incorrect EL expressions for expansions of @Embedded entities and 1:1 relationships
Key: FORGE-872
URL: https://issues.jboss.org/browse/FORGE-872
Project: Forge
Issue Type: Bug
Components: Scaffold
Reporter: Vineet Reynolds
Assignee: Vineet Reynolds
The Faces scaffold generates EL expressions of type {noformat}#{_item.x}{noformat} in the search.xhtml pages for entities that reference a uni-directional 1:1 relationship or embed another entity via the @Embedded annotation.
Since the scaffold attempts to expand these entities and inline them within the search results, the generated EL expressions should instead be {noformat}#{_item.expanded_ref.x}{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
11 years, 7 months
[JBoss JIRA] (FORGE-871) Faces scaffold generates incorrect initializers for OneToOne fields with property based accessors
by Vineet Reynolds (JIRA)
Vineet Reynolds created FORGE-871:
-------------------------------------
Summary: Faces scaffold generates incorrect initializers for OneToOne fields with property based accessors
Key: FORGE-871
URL: https://issues.jboss.org/browse/FORGE-871
Project: Forge
Issue Type: Bug
Components: Scaffold
Reporter: Vineet Reynolds
Assignee: Vineet Reynolds
The Faces scaffold generates initializers in the view bean for @OneToOne relationships. When a property based accessor is used, the initializer expression is incorrectly formed:
{noformat}
this.getX = new X();
{noformat}
This should instead have been:
{noformat}
this.x = new X();
{noformat}
Field based accessors are treated correctly however.
--
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
11 years, 7 months