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 6122455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:54:03+00:00 2026-05-23T15:54:03+00:00

*I got the following in an entity. @Entity(User) public class User implements java.io.Serializable {

  • 0

*I got the following in an entity.

@Entity("User")
public class User implements java.io.Serializable {
    @ElementCollection(fetch=FetchType.EAGER)
    @CollectionTable(name="FrameworkUser_Properties")
    public Map<String, String> getProperties() {
       return properties;
    }
    public void setProperties(Map<String, String> properties) {
       this.properties = properties;
    }
}

i get the following error

Unsuccessful: create table FrameworkUser_Properties (User_id int not null, properties varchar(255) null, properties_KEY varchar(255) null, primary key (User_id, properties_KEY))

Anyone got any idea how i should do so is properties_KEY is not null instead?
I use Hibernate Hibernate 3.6.5.Final, MSSQL

//Trind

  • 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-23T15:54:04+00:00Added an answer on May 23, 2026 at 3:54 pm

    It seems that you are mapping the collection of the value type using the hashmap . You have to specify the key column of the hashmap using @MapKeyColumn

    For example , you can try it to see if the problem can be solved:

    @ElementCollection(fetch=FetchType.EAGER)
    @CollectionTable(name="FrameworkUser_Properties")
    @MapKeyColumn
    public Map<String, String> getProperties() {
               return properties;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given the following entity- public class Friend { public virtual string Name { get;
I've got the following code: private HashMap<Class<?>, HashMap<Entity, ? extends Component>> m_componentStores; public <T
i've got following example xml: <entity id=1> <name>computer</name> <type>category</type> <entities> <entity id=2> <name>mac</name> <type>category</type>
I've got an architecture like the following: Data (Class Library that handles our Entity
I have the following situation: @Entity class A{ @Id @SequenceGenerator(name = SEQ_AID, sequenceName =
I've got to Tables related in one-to-many association: Product*1 - n*Inventory @Entity public class
I got the 2 following entity : User and Post Simple version of user
I've got following problem: (c#) There is some class (IRC bot), which has method,
I got the following class : class ConstraintFailureSet(dict, Exception) : Container for constraint failures.
I got the following Html: <div class=horizontalRadio> <label for=SearchBag.DisplayTypeChips id=DisplayTypeChipsLabel> <%=ViewData.Model.T9nProvider.TranslateById(CommonWeb.Chips)%> </label> <%=Html.RadioButton(displayType, DisplayTypes.Chip,

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.