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: Relation not created on a copy from one database to another
PostPosted: Fri Jan 19, 2007 12:28 pm 
Newbie

Joined: Thu Nov 16, 2006 1:39 am
Posts: 13
Hi

I use NHibernate 1.2.0.2003
SQLite ADO 1.0.39.1
MySQL ADO 1.0.3.31712

I want to copy Users Objects and their related Objects from MySQL to SQLite.

I have a table Users, Users_Has_Credential and Credential.

Users<------>Users_Has_Credential<-------->Credential

If I build 'by hand' a User with one Credential , the User and the Credential records are created in my SQLite database and the Users_Has_Credential is filled with the two IDs.

If I read in MySQL a User with one Credential and write it in SQLite, the User and the Credential records are created in my SQLite database but the Users_Has_Credential is not filled.

No 'INSERT INTO' SQL order is issued for the Users_Has_Credential table.

I use the 'assigned' generator for SQLite coz it does not accept 'native', so the IDs does not change.

How can I oblige NHibernate to fill the join table ?

Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 21, 2007 2:43 pm 
Newbie

Joined: Thu Nov 16, 2006 1:39 am
Posts: 13
My problem is solved using Replicate instead of Save.

The tables and also the relationship are created.


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.