hibernate-generic-dao

Generic DAO and nested properties support

旧巷老猫 提交于 2019-12-23 04:13:27
问题 I am trying to perform a DB access through a DAO object, and I have bumped into the case where I need to query a field in another Entity. Considering two entities (EntityA and EntityB) that are connected in entity A through the foreign key EntityA.idEntityB . I have GenericDao<EntityA> daoA and I am trying to get all the results that match a determined field of EntityB: idEntityB.fieldOfB all in the same find method of the dao. Is it possible? And if so some directions would be nice. Thanks

Generic DAO and nested properties support

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 04:13:16
问题 I am trying to perform a DB access through a DAO object, and I have bumped into the case where I need to query a field in another Entity. Considering two entities (EntityA and EntityB) that are connected in entity A through the foreign key EntityA.idEntityB . I have GenericDao<EntityA> daoA and I am trying to get all the results that match a determined field of EntityB: idEntityB.fieldOfB all in the same find method of the dao. Is it possible? And if so some directions would be nice. Thanks

General or specific DAO to record delivery with information from multiple tables?

柔情痞子 提交于 2019-12-20 05:02:42
问题 I am creating a web application that lets the user store and retrieve information from a DB through a GUI using spring and hibernate. I have gotten stuck when it comes to creating the DAO and service layer. I want to create a method that can add a new delivery. In my delivery table i have Product Id and Customer Id which both are mapped to their own tables that contain Product Name, Product Type and Customer Name, Customer Country respectively. The part that I have trouble with is that I want

How to reload Spring Security Principal after updating in Hibernate?

强颜欢笑 提交于 2019-12-17 22:44:41
问题 This must be a common issue... and I feel that after googling, and SOing I must have just not looked around thoroughly for the answer enough or that no1 has asked it... so please forgive me. I am using Spring Security with Hibernate etc. So a User/principal has logged in and made some changes to their profile. I use my DAO to update the profile (UserDetails), and I want my Principal to automatically reflect this update. However when I get the Principal again, I get the dirty version (from my

Generic Dao, service layer and multiple matching beans

天涯浪子 提交于 2019-12-11 12:48:17
问题 I'm writing a Spring MVC 3.2.3 and Hibernate 4.2.1 application, just starting it's architecture. I decided to go with the Generic Dao pattern, since I'll be using a lot of common CRUD operations. I know that JPA has been around for a while, but I'd really love to achieve this using the generic dao pattern. To the issue it self. Everything went ok when setting up things and testing WITH ONE ENTITY. But as soon as I added a second one, I began to see errors: "No qualifying bean of type [com

General or specific DAO to record delivery with information from multiple tables?

只愿长相守 提交于 2019-12-02 06:56:17
I am creating a web application that lets the user store and retrieve information from a DB through a GUI using spring and hibernate. I have gotten stuck when it comes to creating the DAO and service layer. I want to create a method that can add a new delivery. In my delivery table i have Product Id and Customer Id which both are mapped to their own tables that contain Product Name, Product Type and Customer Name, Customer Country respectively. The part that I have trouble with is that I want the end user to record a delivery by entering the product type, product name, customer name, customer

How to reload Spring Security Principal after updating in Hibernate?

删除回忆录丶 提交于 2019-11-28 20:10:41
This must be a common issue... and I feel that after googling, and SOing I must have just not looked around thoroughly for the answer enough or that no1 has asked it... so please forgive me. I am using Spring Security with Hibernate etc. So a User/principal has logged in and made some changes to their profile. I use my DAO to update the profile (UserDetails), and I want my Principal to automatically reflect this update. However when I get the Principal again, I get the dirty version (from my initial login). Does anyone know of how I can get Spring Security to reload from Hibernate the updated