[seam-issues] [JBoss JIRA] Assigned: (JBSEAM-4306) JpaIdentityStore ignores @Column names for the @RoleName-annotated field

Shane Bryzak (JIRA) jira-events at lists.jboss.org
Mon Feb 22 22:59:18 EST 2010


     [ https://jira.jboss.org/jira/browse/JBSEAM-4306?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shane Bryzak reassigned JBSEAM-4306:
------------------------------------

    Assignee: Shane Bryzak


> JpaIdentityStore ignores @Column names for the @RoleName-annotated field
> ------------------------------------------------------------------------
>
>                 Key: JBSEAM-4306
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-4306
>             Project: Seam
>          Issue Type: Bug
>          Components: Security
>    Affects Versions: 2.1.1.GA
>            Reporter: Eric Jung
>            Assignee: Shane Bryzak
>
> I'm using the JpaIdentityStore as described at http://docs.jboss.com/seam/2.1.1.GA/reference/en-US/html_single/#d0e8804.
> If I define my Role entity like this:
> @Entity
> @Table(name = "ROLES", uniqueConstraints = @UniqueConstraint(columnNames = "ROLES_NAME"))
> public class Role implements java.io.Serializable {
>  ...
> 	@RoleName
> 	@Column(name = "ROLES_NAME", unique = true, length = 300)
> 	private String name;
>   ...
> }
> then Seam generates the following EQL/HQL to authenticate credentials:
>   select r from com.chcf.cams.entities.Role r where name = :role
> it should instead be:
>   select r from com.chcf.cams.entities.Role r where roles_name = :role
> (Note the @Column annotation maps the Java field |name| to the database column ROLES.ROLES_NAME)
> Because of this, authorization and authentication *always* fails. I get this database error when a user attempts to login:
> java.sql.SQLSyntaxErrorException: ORA-00904: "NAME": invalid identifier
> because there is no ROLES.NAME column.

-- 
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

        


More information about the seam-issues mailing list