JDBC « Map « JPA Q&A

1. how to do hibernate mapping for table or view without a primary key    stackoverflow.com

Anyone knows how to do hibernate mapping for table or view without a primary key? thanks.

2. No mapping for LONGVARCHAR in Hibernate 3.2    stackoverflow.com

I am running Hibernate 3.2.0 with MySQL 5.1. After updating the group_concat_max_len in MySQL (because of a group_concat query that was exceeding the default value), I got the following exception ...

3. Deleting a member from a ManyToMany collection throws org.h2.jdbc.JdbcBatchUpdateException    stackoverflow.com

public class Group{
@ManyToMany(fetch=FetchType.EAGER, cascade=CascadeType.ALL, mappedBy="groups")
 public Set<User> getUsers() {
  if(users == null)
   return new HashSet<User>();
   return users;
 public void setUsers(Set<User> users) {

4. mapping byte[] in Hibernate and adding file chunk by chunk    stackoverflow.com

I have web service which receives 100 Mb video file by chunks

public void addFileChunk(Long fileId, byte[] buffer)
How can I store this file in Postgresql database using hibernate? Using regular JDBC is very ...

5. sqlite jdbc driver, hibernate primary keys not mapped?    stackoverflow.com

I am using sqlite db on netbeans. In my database I have 20 tables all having primary key fields. When I am creating hibernate reverse engineering file, IDE displays warning "no ...

6. Hibernate: new insert always overrides previous data    coderanch.com

Hey guys I'm new to using Hibernate. My application is trying to INSERT data into my "Country" database table. Each time I execute the application, the insert is successful. However, the new data overrides the previous data and I'm wondering why a new record is not created each time I do an insert. I'll appreciate your insight. Here's my code: ############################## ...

7. TNS to Hibernate URL mapping    coderanch.com

8. help with inheritance in hibernate    java-forums.org

9. [newbie] Hibernate one-to-one mapping    java-forums.org

@Entity @Table(name = "Cities") public class City implements Serializable { @Id @GeneratedValue private Integer id; @Column(name = "CityName") private String cityName; @Column(name = "Visible") private Integer visible; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getCityName() { return cityName; } public void setCityName(String cityName) { this.cityName = cityName; } public Integer ...

10. Hibernate - Problem with manytomany mapping    java-forums.org

Application is a TV guide. There are two Entity classes - TVChannel and TVProgram and I have many to many mapping between them because the same program can run on multiple channels on different times and even on the same channel on different times. I can attach a TVProgram to multiple channels but problem comes when I'm attaching different startingtimes for ...

12. org.hibernate.DuplicateMappingException: Duplicate class/entity mapping project    java-forums.org

I had this error org.hibernate.DuplicateMappingException: Duplicate class/entity mapping project.hibernate.User and I was searching on Internet about that. It appears because there is 2 persistent class with the same name. my question is: Is it count the extension ? because the classes that I used the same name are User.java y User.hbm.xml. Thanks

13. Caching dynamic-maps in Hibernate    java-forums.org

14. Mapping of JDBC type BIGINT in SqlServerDialect    forum.hibernate.org

The SqlServerDialect (actually the base class SybaseDialect) maps the Types.BIGINT JDBC type to NUMERIC(19). Is there any reason why it doesn't map it to the BIGINT type provided by SqlServer? Beside using 1 byte less (BIGINT=8 bytes, NUMERIC(19)=9 bytes) the mapping to BIGINT is more natural (taking into account that it corresponds to java.lang.Long). I know I can customize SQL type ...

15. JDBC and Hibernate mappings    forum.hibernate.org

Hi, This is about use of JDBC along with Hibernate when required. Mapping of objects is available to Hibernate. So it can know which column corresponds to which attribute of an object and generate SQL queries accordingly. But if an application has to use JDBC (alongside with use of Hibernate) then to write a SQL query based on any attribute (a ...

16. Problems with mapping a Map - "Could not execute JDBC b    forum.hibernate.org

Hi, I'm having some problems with this mapping. Storing a DataElementValidation in the DB works if I set the "context" (Map) to null, but if I try to use a Map, I get the Exception pasted below. Is it something wrong with my mapping below? I expected it had something to do with my session handling, but find it strange that ...