I’m trying to query an entity-view that I created, but
I’m getting the following in ofbiz.log. I’m guessing that the
findAll uses the primary key to perform the query. Is there another way to
query a view WITHOUT using the primary key???
177266[ ControlServlet.java:98 :INFO ] The character
encoding of the request is: [null]. The character encoding we will use for the
request and response is: [UTF-8]
177266[ ControlServlet.java:134:DEBUG] [[[ListEmployees]
Servlet Starting, doing setup- total:0.0,since last(Begin):0.0]]
177266[ ControlServlet.java:183:DEBUG] [[[ListEmployees]
Setup done, doing Event(s) and View(s)- total:0.0,since last([ListEmployees]
S...):0.0]]
177312[ UtilXml.java:242:DEBUG] XML Read 0.015s:
jndi:/0.0.0.0/aztec-hrms/WEB-INF/controller.xml
177312[ ConfigXMLReader.java:552:INFO ] ConfigMap
Created: (4) records in 0.0s
177312[ ConfigXMLReader.java:622:INFO ] HandlerMap
Created: (2) records in 0.0s
177312[ ConfigXMLReader.java:302:INFO ] RequestMap
Created: (26) records in 0.0s
177312[ ConfigXMLReader.java:411:INFO ] ViewMap Created:
(11) records in 0.0s
177312[ RequestHandler.java:208:INFO ] [Processing
Request]: ListEmployees
177312[ RequestManager.java:123:INFO ] [RequestManager.getRequestAttribute]
Value for attribute "null" of uri "ListEmployees" not found
177312[ RequestHandler.java:352:INFO ]
[RequestHandler.doRequest]: Response is a view.
177312[ RequestHandler.java:486:INFO ]
servletName=control, view=ListEmployees
177391[ UtilXml.java:242:DEBUG] XML Read 0.032s:
file:/E:/ofbiz_5521/applications/aztec-hrms/widget/AztecPartyScreens.xml
177406[ ScreenFactory.java:127:INFO ] Got 22 screens in
0.078s from: file:/E:/ofbiz_5521/applications/aztec-hrms/widget/AztecPartyScreens.xml
177437[ PrimaryKeyFinder.java:132:INFO ] Returning null
because found incomplete primary key in find:
[GenericEntity:Party][partyId,null()]
177437[ PrimaryKeyFinder.java:132:INFO ] Returning null
because found incomplete primary key in find:
[GenericEntity:Person][partyId,null()]
177437[ PrimaryKeyFinder.java:132:INFO ] Returning null
because found incomplete primary key in find:
[GenericEntity:PartyGroup][partyId,null()]
177453[ UtilXml.java:242:DEBUG] XML Read 0.016s:
file:/E:/ofbiz_5521/applications/aztec-hrms/widget/CommonScreens.xml
177453[ ScreenFactory.java:127:INFO ] Got 1 screens in
0.016s from:
file:/E:/ofbiz_5521/applications/aztec-hrms/widget/CommonScreens.xml
177516[ ControlServlet.java:258:DEBUG] [[[ListEmployees]
Done rendering page, Servlet Finished- total:0.25,since last([ListEmployees]
S...):0.25]]
My entity is:
<view-entity entity-name="Employee"
package-name="com.aztec.hrms.employee"
title="Employee View Entity">
<member-entity entity-alias="PER" entity-name="Person"/>
<member-entity entity-alias="PER_REL" entity-name="PartyRelationship"/>
<alias entity-alias="PER" name="partyId"/>
<alias entity-alias="PER" name="firstName"/>
<alias entity-alias="PER" name="middleName"/>
<alias entity-alias="PER" name="lastName"/>
<alias entity-alias="PER" name="gender"/>
<alias entity-alias="PER" name="nickname"/>
<alias entity-alias="PER" name="birthDate"/>
<alias entity-alias="PER" name="maritalStatus"/>
<alias entity-alias="PER" name="socialSecurityNumber"/>
<alias entity-alias="PER_REL" name="relationType" field="roleTypeIdTo"/>
<alias entity-alias="PER_REL" name="partyIdFrom"/>
<alias entity-alias="PER_REL" name="partyIdTo"/>
<alias entity-alias="PER_REL" name="roleTypeIdFrom"/>
<alias entity-alias="PER_REL" name="roleTypeIdTo"/>
<alias entity-alias="PER_REL" name="fromDate"/>
<view-link entity-alias="PER" rel-entity-alias="PER_REL">
<key-map field-name="partyId" rel-field-name="roleTypeIdTo"/>
</view-link>
</view-entity>
My bsh to get the data is:
mport
org.ofbiz.entity.*;
delegator =
request.getAttribute("delegator");
employees =
delegator.findAll("Employee");
context.put("employees",
employees);
-----------------------------------------
Michael Irving
Keynetx, Inc. - Building Solutions
for Success
Fax: (425) 871-2838
email: [hidden email]
* * * Visit Our Web Site: http://www.keynetx.net * * *
--------------------------------------------------------------------------------
NOTICE: If received in error, please
destroy and notify sender. Sender does not waive confidentiality or privilege,
and use is prohibited.
Free forum by Nabble | Edit this page |