-->
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: Firebird and views
PostPosted: Tue Jul 26, 2005 6:46 pm 
Newbie

Joined: Tue Jul 19, 2005 4:15 pm
Posts: 4
Location: Utah, USA
The mapping that I am trying to create would be a lot easier if I could map to a view instead of to a table for one class that I have. The Hibernate documentation and groups say that hibernate doesn't know the difference between a view and a table. Is this true with NHibernate, or are my troubles limited to my firebird database?

I tried mapping to a view and NHibernate told me that the table was invalid. I then dropped the view and created a table in it's place and the mapping worked, so there obviously isn't anything wrong with the mapping other than that the underlying schema needed to be a table instead of a view.

To prevent some questions: My test performed only a simple read, i.e. CreateQuery("FROM TableX"), so it should have nothing to do with the insert or update capabilities of the view/class.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 26, 2005 7:38 pm 
Contributor
Contributor

Joined: Thu May 12, 2005 8:45 am
Posts: 226
We map to views now, and it works for simple stuff. Unless the view has primary keys defined, relationships are hard, but that's what the view is for.

For small stuff, it works. As your project grows, it sucks big time.


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.