I really don't know where to ask this, so I am trying here because someone
may have encountered a similar problem...

I use MSSQLServer 2000 and JTurbo (JDBC 2.1) driver.  
Wicket 1.3, Databinder 1.1

I ran into a case where my tables had triggers on them.  Hibernate wouldn't
let the update occur because it looked like I was updating too many rows. 
So, I modified the triggers to SET NOCOUNT ON at the beginning and SET
NOCOUNT OFF at the end.  Query Analyzer reports only one row updated, but
now Hibernate gets ZERO rows.  I assume that it is not Hibernate's fault,
but the JDBC driver reporting the rowcount wrong.

So, I had been planning on switching to the jTDS driver anyway (for when we
switch to SQLServer 2005) so I try to hook that it.  Not a big deal, fix the
hibernate.cfg.xml and a simple JUNIT that uses a Session and Criteria
returns the parent object and children collections just fine.  Enter my
code, Pages, Panels, HibernateObjectModels, etc.  Now, I can't get ALL of
the data to display only the parent object, the child collections appear as
empty.  Arghh!

I know, I know... That's ridiculous, nothing changed but the driver!  So, I
added some code to the page constructor that did very much what the Unit
test did and voila, it worked.  I get a parent object with initialized
collections.  Yet, still when it comes time for the model to pull the
collections off the parent, nothing!  So, I simply switch back to the old
driver and it starts working again.  

What could possibly be happening?  The only real difference (besides the
obvious fact that I am using two different drivers) is that one driver (the
original is a JDBC 2.1) and the new driver (jTDS) is a JDBC 3.0.  But, since
I can pull data with the driver, that doesn't seem like it could be the
problem.  Have you ever encountered something so ridiculous as this?  Why
aren't the Models returning data for the children collections?  Even when I
get a handle to the parent object from the main model and call the
collection directly it doesn't work!  I set fetch=EAGER on the collection,
no luck.  I turned off second level cache, no luck.  I'm very frustrated and
am hoping you have some insight.

n summary, 
using old JDBC 2.1 driver (JTurbo) Hibernate retrieves all data and models
can display all data.
Using new JDBC 3.0 (jTDS), Hibernate retrieves all data, but models only
retrieve the parent data, not children!

Thoughts?

Chuck

-- 
View this message in context: 
http://www.nabble.com/Frustracted-with-JDBC...-tf3375802.html#a9394737
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to