[ 
https://issues.apache.org/jira/browse/CXF-4949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13872979#comment-13872979
 ] 

Sandy Soesilo commented on CXF-4949:
------------------------------------

Hi Sergey,
in my entity I have a camelCase property 
{code}
@Column(name="PHONENO", length=30, nullable=false)
private String phoneNumber;
{code}
with following call in the browser /customers?_s=phoneNumber==12345

I'm using JPATypedQueryVisitor  and he was unable to match the getters/setters 
for this property since it's been lowercased from the beginning.

{quote}Caused by: java.lang.IllegalArgumentException: Unable to locate 
Attribute  with the the given name [phonenumber] on this ManagedType 
[domain.AbstractEntity]
        at 
org.hibernate.jpa.internal.metamodel.AbstractManagedType.checkNotNull(AbstractManagedType.java:144)
        at 
org.hibernate.jpa.internal.metamodel.AbstractManagedType.getAttribute(AbstractManagedType.java:130)
        at 
org.hibernate.jpa.internal.metamodel.AbstractManagedType.getAttribute(AbstractManagedType.java:128)
        at 
org.hibernate.jpa.criteria.path.AbstractFromImpl.locateAttributeInternal(AbstractFromImpl.java:133)
        at 
org.hibernate.jpa.criteria.path.AbstractPathImpl.locateAttribute(AbstractPathImpl.java:212)
        at 
org.hibernate.jpa.criteria.path.AbstractPathImpl.get(AbstractPathImpl.java:185)
        at 
org.apache.cxf.jaxrs.ext.search.jpa.AbstractJPATypedQueryVisitor.getNextPath(AbstractJPATypedQueryVisitor.java:287)
        at 
org.apache.cxf.jaxrs.ext.search.jpa.AbstractJPATypedQueryVisitor.getPath(AbstractJPATypedQueryVisitor.java:278)
        at 
org.apache.cxf.jaxrs.ext.search.jpa.AbstractJPATypedQueryVisitor.buildPredicate(AbstractJPATypedQueryVisitor.java:178)
        at 
org.apache.cxf.jaxrs.ext.search.jpa.AbstractJPATypedQueryVisitor.visit(AbstractJPATypedQueryVisitor.java:123)
        at 
org.apache.cxf.jaxrs.ext.search.SimpleSearchCondition.accept(SimpleSearchCondition.java:321)

        ... 47 more{quote}

Tested with cxf 2.7.8

Thanks



> FIQL - searchContext returns null SearchCondition
> -------------------------------------------------
>
>                 Key: CXF-4949
>                 URL: https://issues.apache.org/jira/browse/CXF-4949
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.6.6
>            Reporter: Swarup
>            Assignee: Sergey Beryozkin
>             Fix For: 2.6.8, 2.7.5, 3.0.0-milestone1
>
>
> Hi,
> I'm trying the fiql expression for the first time, and I get null 
> searchCondition. But when i print the searchContext.getSearchExpression(), it 
> seems to have parsed the query param fine with: lowestPrice=gt=10
> SearchCondition<TourTicketStats> sc = 
> searchContext.getCondition(filterContext.getSearchExpression(), 
> TourTicketStats.class);
> I'm atleast expecting some kind of exception raised if it's not able to parse 
> it. 
> Any help to debug it is appreciated.
> Using v2.6.6
> Thanks



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to