File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes Symbol filteration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Symbol filteration" Watch "Symbol filteration" New topic

Symbol filteration

gaurav gupta sitm
Ranch Hand

Joined: Jun 19, 2011
Posts: 47

On Framework - JPA and Servlet Filter [ex- value.replaceAll("*", "*"); value.replaceAll("&", "&"); etc ]

# cause to -java.lang.NumberFormatException: null

% cause to - null
JPA convert this "%" to "" (Empty) and insert nothing to database so On retrival it returns 'null'

& cause to - Space
JPA convert this '&' (amp) to '"' (Double quotes ) and insert DoubleQuotes to database so On retrival it returns ' ' (Space)

is there any technique to handle these symbols ----
James Sutherland
Ranch Hand

Joined: Oct 01, 2007
Posts: 553
JPA does not do any such conversion. Perhaps include your JPA code.

Are you using parameters? You should be...

TopLink : EclipseLink : Book:Java Persistence : Blog:Java Persistence Performance
wood burning stoves
subject: Symbol filteration
jQuery in Action, 3rd edition