Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 637741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:39:25+00:00 2026-05-13T20:39:25+00:00

How can I set the column’s type to nvarchar(160)? I’m having a hard time

  • 0

How can I set the column’s type to nvarchar(160)? I’m having a hard time making the sample code here relate to my target. I already tried this:

String text

static constraints = {
    text(size:1..160,blank:false)
}    

static mapping =  {
    text type: "nvarchar"
}

I’m encountering this error:
Caused by: org.hibernate.MappingException: Could not determine type for: nvarchar, at table: twitter_status, for columns: [org.hibernate.mapping.Column(text)]

Finally, I’m using MySQL 5 for my database server.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T20:39:25+00:00Added an answer on May 13, 2026 at 8:39 pm

    MYSQL doesn’t have an “NVARCHAR” type (iirc it’s a SqlServer type), here are your choices – http://dev.mysql.com/doc/refman/5.0/en/string-types.html.

    If you need unicode support you’ll also need to make sure you’re sending UTF-8 or UCS2 – http://dev.mysql.com/doc/refman/5.1/en/charset-applications.html

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I set a Column of a Data Type (time) to start from
How can I set a column value at a specified row?
how can a visibility of a particular column can set to false in a
I have a databound list view and can set all the column widths manually
As title, how can I set a table's column to have the default value
How can I programmatically get and set column sorting parameters in AdvancedDataGrid ? I'm
Can I set the column width for all but first column using CSS?
How I can set default value false for bool property in poco object? Column
How can I set the column width of a c# winforms listview control to
How can I set the column width in comments for doxygen? For the following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.