I
am executing a query and I am getting trimmed values back in my String
fields.
Here
is what I have been using -
@Entity
@Table(name
= "ZDK01GENLF", schema = "GNDATA")
public
class Zdk01genlf implements Serializable {
@Column(name = "DESCVAL1", unique = true, nullable = false, length = 40)
private String descval1;
@Column(name = "DESCVAL2", unique = true, nullable = false, length = 40)
private String descval2;
@Column(name = "PREMBASE", unique = true, nullable = false, length = 2)
private String premiumBase;
@Column(name = "EXPBASE", unique = true, nullable = false, length = 5)
private String exposureBase;
@Column(name = "PREMSUBLN", unique = true, nullable = false, length = 3)
private String premiseOpsCovSubline;
// Fields
@EmbeddedId
private Zdk01genlfId id;
@Embeddable
public
class Zdk01genlfId implements Serializable {
@Transient
private static final long serialVersionUID = 8557988537944379720L;
// Fields
@Column(name = "CLASSCD", unique = true, nullable = false, length = 8)
private String classcd;
@Column(name = "EFFDATE", unique = true, nullable = false, length = 8)
private String effdate;
@Column(name = "EXFDATE", unique = true, nullable = false, length = 8)
private String expdate;
}
And
I execute this -
queryString
= SELECT model FROM Zdk01genlf model WHERE UPPER(TRIM(FROM
model.id.classcd)) LIKE :propertyValue and 20110331 >=
model.id.effdate and 20110331 <= model.id.expdate order by
model.descval1
From
-
final
Query query = this.em.createQuery(queryString);
query.setParameter("propertyValue", value);
return
query.getResultList();
Any
ideas why the values are trimmed?
Thanks,
Kevin
This message (including any attachments) is intended only for
the use of the individual or entity to which it is addressed and
may contain information that is non-public, proprietary,
privileged, confidential, and exempt from disclosure under
applicable law or may constitute as attorney work product.
If you are not the intended recipient, you are hereby notified
that any use, dissemination, distribution, or copying of this
communication is strictly prohibited. If you have received this
communication in error, notify us immediately by telephone and
(i) destroy this message if a facsimile or (ii) delete this message
immediately if this is an electronic communication.
Thank you.