-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Null Values from View through HQL
PostPosted: Fri Apr 16, 2010 7:54 am 
Newbie

Joined: Fri Apr 16, 2010 6:12 am
Posts: 2
I have a master_data table, which has 100 rows of data.
I created a view master_data_view in the database, selecting few columns in the master_data table.

Now In the java code.

String queryString = "from MasterDataView";
List<MasterDataView> data = entityManager.createQuery(queryString).getResultList();

I get list with the size of 100, but all are null values. Where did the data go.

I then switched on the DEBUG log hibernate, and got hold of the native SQL that gets executed on the
database. This SQL fetches me all the records when i run it on the Database console.

One thing i noticed in the debug log is

2010-04-16 11:52:23,372 DEBUG [org.hibernate.loader.Loader] result row: null


Why is this inconsistent behavior when executed through EntityManger.

I use Sybase for database, Jboss for AS, The EntityManager is from javax.persistence


Top
 Profile  
 
 Post subject: Re: Null Values from View through HQL
PostPosted: Mon Apr 19, 2010 3:31 am 
Newbie

Joined: Fri Apr 16, 2010 6:12 am
Posts: 2
Only Retrieval is the problem.
But I can update the view.

Hibernate Gurus there, any Idea.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.