cancel
Showing results for 
Search instead for 
Did you mean: 

Where can I specify the EJB quries in persistent.xml file

Former Member
0 Kudos

Hi all,

I Migrating Petstore demo 1.3.2 application to SAPWAS.

I am facing some problem with EJB Quries. Where can I specify these EJB Quries i.e SQL Quries, in persistent.xml file and give me the exact tag names to specify the quries.

Thanks,

Regards

Madhuri.

Accepted Solutions (0)

Answers (1)

Answers (1)

kishorg
Advisor
Advisor
0 Kudos

Hi Madhuri,

<abstract-schema-name>UserAccount</abstract-schema-name>

...

<query>

<query-method>

<method-name>findByEmail</method-name>

<method-params>

<method-param>java.lang.String</method-param>

</method-params>

</query-method>

<ejb-ql>

[!CDATA[

SELECT DISTINCT object(ua)

FROM UserAccount ua

WHERE ua.email = ?1]]

</ejb-ql>

</query>

In EJB QL the <abstract-schema-name> tag defines a value analogous to a table name in standard

SQL. In the code above, the abstract schema name is UserAccount, and it maps to the bean named

UserAccountBean.

in EJB QL Abstract Schema Name have importance . u have to give this here ..

Regards

Kishor Gopinathan

Message was edited by: Kishor Gopinathan