Mantis - Resin
Viewing Issue Advanced Details
2053 major always 10-10-07 10:01 11-06-07 14:27
westrupp  
ferg  
normal  
closed 3.1.3  
fixed  
none    
none 3.1.4  
0002053: amber @NamedQuery does not work with inheritance
(rep by Sergey Plehov)

I find and issue with CMP Inheritance and named queries.
If in Example CMP Inheritance ( http://caucho.com/resin-3.1/examples/amber-inherit/index.xtp [^] ) in class Student.java define named query, i got the following exception

com.caucho.config.ConfigException: Named query 'findByName': 'select
o from Student o where o.name=:name' is already defined.

Source code:

package example;

import javax.persistence.*;

@Entity
@Table(name="amber_inherit_student")
@Inheritance
@DiscriminatorValue("student")
@DiscriminatorColumn(name="type")

@NamedQuery(name = "findByName", query = "select o from Student o where o.name=:name") \\ test named query

public class Student {
...
}

Notes
(0002456)
ferg   
11-06-07 14:27   
jpa/0l50