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

Ejb 3.0 annotation for sql type: text

Hi.
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:
@Temporal(TemporalType.Text)
private String test;

Any idea how I can do this?
0
kristian_gr
Asked:
kristian_gr
1 Solution
 
NelliosCommented:
Maybe you can try something like:
@Lob
 @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.
0

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