Custom « Load « JPA Q&A





1. NHibernate Custom HQL for loading    stackoverflow.com

The following is from the NHibernate documentation: 15.4. Custom SQL for loading You may also declare your own SQL (or HQL) queries for entity loading:

<sql-query name="person">
    <return alias="pers" class="Person" ...

2. Hibernate can't load Custom SQL collection    stackoverflow.com

There is a table Item like,

code,name
01,parent1
02,parent2
0101,child11
0102,child12
0201,child21
0202,child22
Create a java object and hbm xml to map the table.The Item.parent is a Item whose code is equal to the first two characters of its ...

3. Custom classloader for Hibernate-mapping    stackoverflow.com

Does anyone know a way to intercept the call Hibernate will make to instantiate a class indicated in a .hbm.xml file? I need a way to use a custom ClassLoader ...

4. Custom PropertyAccessor / illegal access to loading collecti    forum.hibernate.org

Hibernate-Version: 3.3.2 GA Hello all, since Google responses nothing (!) to: "org.hibernate.LazyInitializationException: illegal access to loading collection" PropertyAccessor ...and only searching for the Exception leads me nowhere, I would like to ask for help with my problem here. I wrote a custom PropertyAccessor Code: public class MyPropertyAccessor implements PropertyAccessor with this code within the set-Method of the Setter: Code: ...

5. Custom SQL for loading not working with composite-id?    forum.hibernate.org

Author Message ernst_pluess Post subject: Custom SQL for loading not working with composite-id? Posted: Thu Sep 23, 2004 10:03 am Expert Joined: Thu Jan 29, 2004 2:31 am Posts: 362 Location: Switzerland, Bern From the mapping docs below you can see that I tried to add a custom sql to load class C. C has a composite-id. Now I ...

6. loading a set with custom sql    forum.hibernate.org

I really like the feature of Hibernate 3 that you can define custom SQL for loading and updating objects. Although it seems that it is not yet well documented. I would like to load a set with a custom SQL. In this example I want to load User objects that are defined by one or more textual filters that is stored ...

7.  not working with custom join express    forum.hibernate.org

Author Message morinel Post subject: not working with custom join express Posted: Thu Jun 02, 2005 5:58 am Newbie Joined: Sun Oct 10, 2004 2:19 pm Posts: 7 I have the following problem setting my Report.locations property according to the following original SQL query: select l.*, r.* from reports r left outer join locations l on (r.location = ...

8. Implementing custom proxies for lazy loading    forum.hibernate.org

9. Custom SQL for loading    forum.hibernate.org

Author Message nahmed Post subject: Custom SQL for loading Posted: Tue Jul 26, 2005 6:20 am Newbie Joined: Fri Mar 25, 2005 3:07 pm Posts: 11 Hi, A newbie to HIbernate, and was hoping someone would be able to help. I just want to basically use an SP to load from the db. Could someone be kind enough to ...





10. Using SP for Custom Loading    forum.hibernate.org

Guys, Was hoping one of you kind fellas can help with this one. Basically, I have written an SP for custom loading. - Its is used as a namedQuery to populate the objects. - I also wanted to use it to re-load my objects when calling session.refresh. (SP's use some logic to populate some of the properties - and need these ...

11. Custom SQL for loading objects    forum.hibernate.org

Need help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp Hibernate version: 3.1 beta 1 Mapping documents:

12. Custom events on domain objects loaded over dif sessions...    forum.hibernate.org

I am writing a complex windows forms application with lots of ways to view and edit each domain object. All of my domain objects implement INotifyPropertyChanged (ie, they all have a PropertyChanged event) so that when properties are changed, it is reflected in all the appropriate places. My object model is selected from the database in lots of separate on-demand sessions ...

13. Custom SQL for loading a collection    forum.hibernate.org

Hello, I would like to use custom SQL for loading a collection. After a look to the Hibernate reference I need to say that this feature is quite poorly documented, at least for me (I am a newbe). Examples presented there do not show how to use this in general. A also checked "Hibernate in Action" and "Hibernate Quickly" and found ...

14. Custom SQL for loading - is this a bug?    forum.hibernate.org

Author Message cemartins Post subject: Custom SQL for loading - is this a bug? Posted: Fri May 19, 2006 1:58 pm Newbie Joined: Tue Dec 13, 2005 11:19 am Posts: 5 Location: Lisboa, Portugal I have a problem using custom SQL for loading a collection. coded this small test case just for demonstration purposes, and I have these rows ...

16. Domain obj mapped with derived property - load w/custom sql?    forum.hibernate.org

Newbie Joined: Thu Aug 16, 2007 1:24 pm Posts: 4 Hibernate version: 3.2.4.sp1 Name and version of the database you are using: Oracle 10 I have a ContractTier object loaded normally by hibernate via the following mapping: Code: ...





17. custom sql for loading a collection    forum.hibernate.org

Hi, I'm a new user here stuck trying to load a collection using a custom sql. I would appreciate any help on this. Here is the simplified version of my mapping: select {i.*} from ...

18. How to auto-load a property with a custom query?    forum.hibernate.org

I have a property in my entity that needs to be loaded using a custom query. How do I need to configure the mapping so that it's loaded automatically every time the entity is loaded or refreshed? Is there a JPA annotation for this or do I need to use native hibernate? thanks