• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 208
  • Last Modified:

Ejb 3.0 annotation for sql type: text

I'm using ejb 3.0, and glassfish with postgresql.
PostgreSql has a sqlType called 'text'.

Now I'm creating my tables from my ejb through glassfish.
If I'm using String as type ex:
private String test;
public void setTest(String test) { this.test = test; }
public String getTest() { return this.test; }

I get a column test as varchar(255).

I'm looking for the right type of annotation to override this, so that test ends up as "text"
Probaby some annotation ala:
private String test;

Any idea how I can do this?
1 Solution
Maybe you can try something like:
 @Column(name = "Info")
 private String info;

It works for TEXT fine with mysql I don't see a reason why not to work with postgress.

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now