[jboss-user] [EJB3] - Re: EntityManager.find returns null.
Wolfgang Knauf
do-not-reply at jboss.com
Wed May 18 09:06:20 EDT 2011
Wolfgang Knauf [http://community.jboss.org/people/WolfgangKnauf] created the discussion
"Re: EntityManager.find returns null."
To view the discussion, visit: http://community.jboss.org/message/605839#605839
--------------------------------------------------------------
Hi,
you might fill your "ID" with spaces before putting it in "find" ;-).
Do you have control over the oracle, or is it a predefined schema? If you can control it:
a) did you declare a type-mapping in your "....-ds.xml", e.g. something like this?
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<metadata>
<type-mapping>Oracle9i</type-mapping>
</metadata>
In "\server\default\conf\standardjbosscmp-jdbc.xml, the java type "String" is mapped to "VARCHAR(255)" for "Oracle9i".
b) in "persistence.xml", you can set a property "hibernate.dialect":
http://docs.jboss.org/hibernate/core/3.3/reference/en/html/session-configuration.html#configuration-optional-dialects http://docs.jboss.org/hibernate/core/3.3/reference/en/html/session-configuration.html#configuration-optional-dialects
Hope this helps
Wolfgang
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/605839#605839]
Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110518/6473a83a/attachment-0001.html
More information about the jboss-user
mailing list