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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:44:53+00:00 2026-06-15T11:44:53+00:00

i got the following entity: @Entity public class Person { @Id @GeneratedValue(strategy=GenerationType.AUTO) @Column(columnDefinition=int(11),nullable=false) private

  • 0

i got the following entity:

@Entity
public class Person {

@Id
@GeneratedValue(strategy=GenerationType.AUTO)
@Column(columnDefinition="int(11)",nullable=false)
private int id;

@Column(columnDefinition="varchar(255)",nullable=false)
private String name;

@Column(columnDefinition="varchar(255)",nullable=false)
private String vorname;

@Column(columnDefinition="varchar(255)",nullable=false)
private String password;

@Column(columnDefinition="varchar(100)",nullable=false)
private String user;

@Column(columnDefinition="varchar(20)",nullable=false)
private String klasse;

@Temporal(TemporalType.TIMESTAMP)
@Column(name="timestamp",nullable = false,columnDefinition="default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP")
private Date timestamp = new Date();


public Person(){

}
@PreUpdate
public void updatePerson(){
    this.timestamp = new Date();
}


...getters
    ...setters

}

When invoking hibenate , i get an error when hibernate wants to create the table. it seems the errror occurs, beacause the column timestamp has no name:

ERROR: HHH000389: Unsuccessful: create table Person (id int(11) not null auto_increment, klasse varchar(20) not null, name varchar(255) not null, password varchar(255) not null, timestamp default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP not null, user varchar(100) not null, vorname varchar(255) not null, primary key (id)) type=MyISAM

Does anyone knows why hibernate does this ?

  • 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-06-15T11:44:53+00:00Added an answer on June 15, 2026 at 11:44 am

    It’s not a column without name, it’s a column without type.

    Hibernate expects that columnDefinition contains column type as well:

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="timestamp", nullable = false,
        columnDefinition="TIMESTAMP default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP")
    private Date timestamp = new Date();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got the following codes: public class Trip { public int TripId { get;
Let's say I got the following Entity Framework Ruimte model: public class Ruimte {
I've got the following models: public abstract class PersonBase : EntityWithTypedId { public PersonBase()
I've got an architecture like the following: Data (Class Library that handles our Entity
Given the following entity- public class Friend { public virtual string Name { get;
I have the following relation of three classes: @Entity public class User{ @OnetoMany List<Attribute>
I've got to Tables related in one-to-many association: Product*1 - n*Inventory @Entity public class
I've got a StoreOwner entity. StoreOwner has a Store property. public class Product {
I've got 2 entity classes as follows: @Entity @Table(name = USER_ACCT) public class UserAccount
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>

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.