• Post Reply Bookmark Topic Watch Topic
  • New Topic

[Stripes + Hibernate] question on db fields type

 
Gabriele Fabbri
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

using the property

when I deploy the project I get a varchar(255) field in the database (MySQL).
In the same model class I have another property "text".
I would like to store its value in a "text" type field in db, but I can't understand how to get this result.

Thank you.
 
Aaron Porter
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stripes doesn't have Hibernate integration built in so I'm assuming you're using Stripersist or Stripernate. This is really a Hibernate (or JPA) question. Try annotating the field with @Lob. You'll need to drop the field so it can be recreated.
 
Gabriele Fabbri
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your reply Aaron.
Yes, I'm using Stripersist for the integration with Hibernate.
So, if I understood, I have to use some specific annotations to define the type of database field I want get from Hibernate. Right?
I'm sorry if I posted the question in the wrong forum, I'm totally new to Hibernate.
Thank you again, I'll try your suggestion.

Cheers,
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!