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.  [ 1 post ] 
Author Message
 Post subject: Is it possible to use FKs with NHibernate and SQLite?
PostPosted: Wed Sep 08, 2010 8:29 am 
Newbie

Joined: Wed Aug 25, 2010 12:52 pm
Posts: 12
Hi!

I'd like to program a little application with SQLite as Database and NHibernate as OR-Mapper.
I have some tables with foreign keys and i'm not sure if it is possible to do this with NHibernate and SQLite because SQLite doesn't support foreign keys by default. But I found some information in the internet that it is possible to do something like that with triggers. But now my question:
Because I don't have "real" foreign keys is it even possible to do correct mapping with NHibernate between different tables.
My code looks for example like this:
Code:
      <generator class="foreign">
        <param name="GeoData"/>
      </generator>

So I think I should have "real" foreign keys. But that's not possible with SQLite...
My current error message: NHibernate.MappingException : could not instantiate id generator: foreign

Regards


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

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.