mysql « Insert « JPA Q&A





1. How to insert ' in DB using Hibernate    stackoverflow.com

I'm using hibernate for all DB operations. My problem is that, I want to insert an string in table which contains ' e.g. rea9'ea/rea9'ea. While inserting it I'm getting the following ...

2. Hibernate / MySQL Bulk insert problem    stackoverflow.com

I'm having trouble getting Hibernate to perform a bulk insert on MySQL. I'm using Hibernate 3.3 and MySQL 5.1 At a high level, this is what's happening:

@Transactional
public Set<Long> doUpdate(Project project, IRepository externalSource) {
 ...

3. MySQL INSERTs progressively slower on Ubuntu, but not on Windows    stackoverflow.com

I try to insert 3.6 million records in MySQL 5.1 using JPA in Glassfish 3.0.1. I do it in one single EJB business method call, so I beleive it is done ...

4. Mysql inserting values    stackoverflow.com

I am storing an Object into my database, and I think I am making some stupid mistake which I don't see. I attache some code to understand mi problem: MyObject.java ...

5. insertion in database using hibernate    stackoverflow.com

I have this in my console when I insert in database, I use MySQL 5.0 and hibernate2 :

Hibernate: insert into employe 
(prenom, mail, adresse, tel, service, fonction, login, password
 , matricule, ...

6. how to perform one-to-one relational insertion in database    stackoverflow.com

I am using Mysql. And I have two tables which are one-to-one related with each other. In other words, they both have a foreign key constraint referencing the primary key of the ...

7. JPA do not insert in database, why?    stackoverflow.com

i'm new with JPA, i'm using in a JSF 2 Project with Glassfish 3 and Eclipse Java EE Web Developers. These are my settings and the way that I'm trying to persist ...

8. Bulk insert OR update with hibernate?    stackoverflow.com

I need to consume a rather large amounts of data from a daily CSV file. The CSV contains around 120K records. This is slowing to a crawl when using hibernate. Basically, ...

9. Problems with last_insert_id and mysql    forum.hibernate.org

Newbie Joined: Sun Jul 04, 2010 11:54 pm Posts: 2 I'm am positive that this is somewhere on these boards, and I've spent some time searching but no luck. I have the following table in mysql: CREATE TABLE IF NOT EXISTS `application_groups` ( `id` int(11) NOT NULL auto_increment, `application_id` int(11) NOT NULL, `group_id` int(11) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY ...





10. Hibernate 2.1.x, MySQL alter table add column DDL    forum.hibernate.org

Hello, First, as always: Kudos to Hibernate team. Thanks for great project. I've experienced a problem with a few versions of Hibernate 2.1.x. When adding a boolean field to a MySQL table with a not-null value set to true, the ddl comes out as: alter table tablename add column booleancolumn BIT leaving off the "NOT NULL" Finally motivated to go a ...

11. c3p0, mysql, second insert fails with nullexception    forum.hibernate.org

Hell everyone. I wanted to try out C3P0 for pooling vs using tomcats JNDI named pool and a simple test app that creates 2 objects in the db is failing with a null exception on the second object. This works fine using just a connection.datasource= in my hibernate config but switch it to c3po (config below) and it fails every time. ...

12. Hibernate 3.0 with MySQL 5.0(would not insert)    forum.hibernate.org

Hi, I found out this particular issue withi hib3.0 when using it with mysql5.0 Whenever i try to write(insert) some data it never writes , but reading from the tables works fine. The same hib 3.0 works fine with mysql4.0. Now that might seem to be mysql problem. However interesting part being that a normal jdbc call to mysql 5.0 works ...

13. Problems Inserting to a MySQL 5.0.27 database    forum.hibernate.org

Hi, I'm having a problem inserting into a MySQL 5.0.27 database on Windows. I'm pretty new to Hibernate and MySQL, so I likely overlooked something in configuration. I've had no luck searching the FAQs, so hopefully someone can help here. It seems that MySQL always refuses the SQL generated by Hibernate. However, if I copy and paste the SQL into a ...

14. how to get the recently inserted id in hibernate using MYSQL    forum.hibernate.org

Hi I can't understand what you want. But i think this is the thing what you want. HibObject obj=new HibObject(); obj.setSomeValue("some"); // this is a field not a id trans =session.beginTransaction(); session.save(obj); trans.commi(); so after commit() you can get id from obj.getMyId(); you should use your getter for id propery. Amila (Don't forget to rate if helps)

15. could not perform insert in MYSQL database    forum.hibernate.org

I am beginner and could not perform database insert. everything else is mentioned below- Hibernate version: - 3.0 Mapping documents:

16. MySQL bulk insert    forum.hibernate.org

Hi, I am using hibernate 3 with MySQL and was wondering how I can do a bulk insert from a ArrayList of hibernate objects. I googled and got many hits, but could not find a solution to my case. I want to generate a query like: INSERT INTO sometable (col1, col2, col3) VALUES (1,2,3),(4,5,6),(7,8,9) But everything I try with hibernate creates ...