36
votes
4answers
19k views

proper hibernate annotation for byte[]

I have an application using hibernate 3.1 and JPA annotations. It has a few objects with byte[] attributes (1k - 200k in size). It uses the JPA @Lob annotation, and hibernate 3.1 can read these just ...
4
votes
3answers
3k views

XML data to PostgreSql database

What would be the best way to insert XML data ,that i get from webpage, into Postgresql database? Im using Java and need little help finding good way to read this data into the database. Please help ...
0
votes
1answer
2k views

Driver JDBC PostgreSQL with Android [duplicate]

I'm trying to connect my android application to a server (PostgreSQL) with JDBC Driver, but i have this error : java.lang.ClassNotFoundException: org.postgresql.Driver ... Caused by: ...
3
votes
5answers
8k views

Hibernate use of PostgreSQL sequence does not affect sequence table

I've configured Hibernate to use PostgreSQL sequence (via annotations) to generate values for primary key id column as follows: @Id ...
26
votes
13answers
34k views

How to get a value from the last inserted row?

Is there some way to get a value from the last inserted row? I am inserting a row where the PK will automatically increase, and I would like to get this PK. Only the PK is guaranteed to be unique in ...
10
votes
2answers
5k views

mapping a postgres array with hibernate

has anyone successfully mapped a numeric array in postgres to a numeric array in java via hibernate? sql: CREATE TABLE sal_emp (name text, pay_by_quarter integer[]); INSERT INTO sal_emp VALUES ...
9
votes
5answers
2k views

Which is better? Performing calculations in sql or in your application

shopkeeper table has following fields: id (bigint),amount (numeric(19,2)),createddate (timestamp) Let's say, I have the above table. I want to get the records for yesterday and generate a report ...
3
votes
4answers
1k views

Hibernate 'Inverse' in mapping file

Can someone explain the use of inverse in the xml mapping file, I am reading the tutorial but failing to understand its use in the mapping file?? Thanks
8
votes
4answers
11k views

Is it possible to specify schema when connecting to postgres with JDBC?

Is it possible? Can i specify it on the connection URL? How to do that?
2
votes
4answers
1k views

Recommendation System for a book store application

Hey I'm trying to learn some of the recommendation algorithms that's being used in websites like Amazon.com. So I have this simple java (spring hibernate postgres) book store application where in Book ...
2
votes
2answers
3k views

Postgresql UUID supported by Hibernate?

I'm desperate, can't get Hibernate working with UUID for PostgeSQL. Here is the mapping using javax.persistence.* annotations: private UUID itemUuid; @Column(name="item_uuid",columnDefinition="uuid ...
2
votes
2answers
5k views

Mapping array with Hibernate

Can you please help me to map th class Hbernate? public class MyClass{ private Long id; private String name; private int[] values; //omitting getters and setters } I'm using PostgreSQL and the ...
6
votes
2answers
1k views

Hibernate saving User model to Postgres

I'm using Postgres via Hibernate (annotations), but it seems to be falling over dealing with a User object: 12:09:16,442 ERROR [SchemaExport] Unsuccessful: create table User (id bigserial not null, ...
2
votes
1answer
3k views

how to copy a data from file to PostgreSQL using JDBC?

I want to copy data from file to PostgreSQL DB using JDBC. I was using JDBC statement object to copy the file into DB. It is very slow. I came to know that we can also use copy out command to copy ...
0
votes
2answers
5k views

“java.lang.NoSuchFieldError: NONE” in hibernate with Spring 3, maven, JPA, c3p0

Problem: Hibernate is not executing queries correctly. It errors with a problem that appears to be related to slf4j but using any recommended fixes don't seem to work. I've tried various ...

1 2 3 4 5 9
15 30 50 per page