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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:39:54+00:00 2026-05-27T23:39:54+00:00

Database: user_account id(pk) email password … user_detail id(pk fk) name_first name_last … Entity @Entity

  • 0

Database:

user_account
id(pk)
email
password
...

user_detail
id(pk fk)
name_first
name_last
...

Entity

@Entity
@Table(name="user_account")     
@SecondaryTable(name="user_detail", pkJoinColumns=@PrimaryKeyJoinColumn())
public class UserAccount implements Serializable{
    private static final long serialVersionUID = -2606506548742732094L;

    @Id
    @GeneratedValue(strategy=GenerationType.AUTO)
    private Integer id;
    private String email;
    private String password;
    private String tab;
    private String shortcut;
    private String setting;
    private Integer role;

    @Column(table="user_detail", name="name_first")
    private String nameFirst;
    @Column(table="user_detail", name="name_last")
    private String nameLast;
    @Column(table="user_detail")
    private String occupation;
    @Column(table="user_detail")
    @Temporal(TemporalType.DATE)
    private Date birth;
    ....
}

Action

    try{
        EntityTransaction transaction = em.getTransaction();
        transaction.begin();
        em.persist(currentUser);

        transaction.commit();
    } catch (Exception e){
    }

Error

INFO: [EL Warning]: 2012-01-06
18:45:46.77–ClientSession(17472935)–Exception [EclipseLink-4002]
(Eclipse Persistence Services – 2.3.0.v20110604-r9504):
org.eclipse.persistence.exceptions.DatabaseException Internal
Exception: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table
‘mazedb.sequence’ doesn’t exist Error Code: 1146 Call: UPDATE SEQUENCE
SET SEQ_COUNT = SEQ_COUNT + ? WHERE SEQ_NAME = ? bind => [2
parameters bound] Query: DataModifyQuery(name=”SEQUENCE” sql=”UPDATE
SEQUENCE SET SEQ_COUNT = SEQ_COUNT + ? WHERE SEQ_NAME = ?”)

INFO: ERROR: Internal Exception:
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table
‘mazedb.sequence’ doesn’t exist Error Code: 1146 Call: UPDATE SEQUENCE
SET SEQ_COUNT = SEQ_COUNT + ? WHERE SEQ_NAME = ? bind => [2
parameters bound] Query: DataModifyQuery(name=”SEQUENCE” sql=”UPDATE
SEQUENCE SET SEQ_COUNT = SEQ_COUNT + ? WHERE SEQ_NAME = ?”)

I tried the other way around, having two different entities merged by @PrimaryKeyJoinColumn but I got the same error.

  • 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-27T23:39:55+00:00Added an answer on May 27, 2026 at 11:39 pm

    If EclipseLink tries to access this table, that means that it’s supposed to be there. GenerationType.AUTO means that EclipseLink chooses the most appropriate generation type for your database (MySQL). In this case, the choice is to use a table-based generator, which needs a table. See http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Basic_JPA_Development/Entities/Ids/GeneratedValue.

    If you don’t want to use this strategy, choose another one.

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

Sidebar

Related Questions

Database *user_account* id (PK) email password *user_detail* id(PK)(FK) name city Entities @Table(name=user_detail) public class
In my user database table, I take the MD5 hash of the email address
I already have a User table in my primary application database with an email
I have a database with user 'dbo' that has a login name domain\xzy. How
I have a User controller and User model. This model and associated database table
I have a user Sql Authentication account that has remote access to my database
Situation: I am creating a database user interface for a client's website. I know
I got two tables in my database: user and call. User exists of 3
i have a large user Database (13k+), and for some reason i need to
What is the best way to do per-user database connections in Rails ? I

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.