Historically, Hibernate facilitated the storage and retrieval of Java domain objects via Object/Relational Mapping. Today, Hibernate is a collection of related projects enabling developers to utilize POJO-style domain models in their applications in ways extending well beyond Object/Relational ...
1
vote
1answer
72 views
A database schema for an online rental store
I am creating an online rental store using the following:
JSF 2.1
Hibernate 4.2
Spring 3.2
MySQL 5.5
Below is my database schema design:
Link in case image not displayed.
The rental user has ...
2
votes
1answer
50 views
ORM Entity with many similar relationships
To provide some background context, I'm implementing a web-based solution (Java, Spring, Hibernate) that allows the creation/authoring of task-centric workflow documents. Basically a workflow ...
0
votes
2answers
79 views
Repetitive code for different Database Entities with same implementation
I have this code in LogInService
public User isValid(User user) {
if(user == null)
return user;
User db_user = userDao.getUserByUsername(user.getUsername());
if ...
1
vote
1answer
142 views
JPA connection : is this code is efficient enough
By reading some tutorial i have written some peace of code to do crud operation . I just want to know how is this code is efficient or how can i make better ?
Here i am giving code of 3 class
1. ...
2
votes
1answer
59 views
Any problems in using hibernate's session.connection() to run native sql
In my project, they use Hibernate's session the below mentioned way and then save entity objects with in a transaction.
Session session = HibernateUtil.getCurrentSession();
...
0
votes
0answers
1k views
Many to many hibernate mapping if link table is having extra columns mappings
Hi i have many to many mapping with extra columns in the join table.
table structure look like this.
table vendor{vendor_id, vendor_name, vendor_password, etc...}
table student{student_id, ...
1
vote
0answers
70 views
Hibernate @OneToMany relationship
I started to play around with Hibernate since yesterday and came with the following example of OneToMany relationship example, but I am not sure if I am doing right and I have no one around me knowing ...
0
votes
1answer
554 views
Spring with Hibernate DAO layer architecture? [closed]
I am using Spring with Hibernate in my web application and I tend to use HibernateDaoSupport because it will open session and close session automatically. I have two entities Route(route_id, source, ...
2
votes
2answers
317 views
Dao function using hibernate
Just wondering if the following is the best way to write a dao function, should i get the entity manager before the transaction and close it after the transaction everytime? should i write ...
1
vote
0answers
176 views
Is it Best way to use HibernateCompositeUser type for handling localized contents
I am trying to use HibernateCompositeUser type to handle i18n specific data in my application. i am trying to use the below approach.
I have a table named master table which contains all locale ...
0
votes
1answer
149 views
hope some one can check my application for the hibernate mapping realated problem [closed]
I am building a web application.
There are some models:
User
Department
Task
Operator
TaskStep
Admin
Where user can add tasks belong to his department,a task is made up by some tasksteps.The ...
1
vote
1answer
773 views
Hibernate proxy converter for GWT
Here's a class that converts Hibernate proxies to normal classes. This is useful with GWT for example, when sending objects loaded from database to the GWT client.
Please review it.
package ...
1
vote
2answers
383 views
Hibernate transaction advice [closed]
I'm new to Hibernate so I need some advice/direction on doing Transactions.
I have a DAO like
public class MyDao extends HibernateDaoSupport implements IMyDao {
@Override
public Foo getFoo(int ...