Toga Hartadinata
Toga Hartadinata

Reputation: 11

How do I mapped an oracle table column of type NVARCHAR2(100) to JPA fields?

I have an oracle table that contains 4 columns, one of them is a localizedText of type NVARCHAR2(100).

When I import the table using Eclipse (MARS) environment JPA class, it creates a class but then create a field private Object localizedText. Which errors out when i run the code since during runtime it does not accept a field of type object.

How do I change the private Object localizedText; definition to work with an oracle NVarChar2(100) type column?

Thanks

Upvotes: 1

Views: 456

Answers (1)

naresh
naresh

Reputation: 2113

Define the attribute as String in your JPA class

Upvotes: 1

Related Questions