foreign key violation

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

foreign key violation

Robert Eikermann-2

Hi,

I have a problem with foreign key violations in my tests. This (http://www.dbunit.org/faq.html#tableseq) helped me already a lot but:

When tables will be filled during the test which are not filled by the dataset XML-File the DatabaseSequenceFilter will not work for those tables and I get the foreign key error. I think the DatabaseSequenceFilter sorts only the tables (accordingly the foreign keys) which are in the Dataset and not all tables of the Database. My first approach is to use all tables in the Dataset which will be used in the tests, but is there another/better solution?

 

Thank you for your help!

 

Best regards

Robert


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: foreign key violation

Andy Stevens-2

If the other tables aren't being filled by the xml dataset, then what are they filled by?

Andy.

On 30 Dec 2011 01:11, "Robert Eikermann" <[hidden email]> wrote:

Hi,

I have a problem with foreign key violations in my tests. This (http://www.dbunit.org/faq.html#tableseq) helped me already a lot but:

When tables will be filled during the test which are not filled by the dataset XML-File the DatabaseSequenceFilter will not work for those tables and I get the foreign key error. I think the DatabaseSequenceFilter sorts only the tables (accordingly the foreign keys) which are in the Dataset and not all tables of the Database. My first approach is to use all tables in the Dataset which will be used in the tests, but is there another/better solution?

 

Thank you for your help!

 

Best regards

Robert


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: foreign key violation

Robert Eikermann-2

They are filled during my JUnit Tests and then the cleanup will cause the error.

 

Von: Andy Stevens [mailto:[hidden email]]
Gesendet: Freitag, 30. Dezember 2011 09:15
An: [hidden email]
Betreff: Re: [dbunit-user] foreign key violation

 

If the other tables aren't being filled by the xml dataset, then what are they filled by?

Andy.

On 30 Dec 2011 01:11, "Robert Eikermann" <[hidden email]> wrote:

Hi,

I have a problem with foreign key violations in my tests. This (http://www.dbunit.org/faq.html#tableseq) helped me already a lot but:

When tables will be filled during the test which are not filled by the dataset XML-File the DatabaseSequenceFilter will not work for those tables and I get the foreign key error. I think the DatabaseSequenceFilter sorts only the tables (accordingly the foreign keys) which are in the Dataset and not all tables of the Database. My first approach is to use all tables in the Dataset which will be used in the tests, but is there another/better solution?

 

Thank you for your help!

 

Best regards

Robert


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: foreign key violation

Jeff Jensen-2
Add empty table entries to the xml file for those tables with no prep
data so dbunit knows to clean them up too.  Place them in the correct
order with the other tables so dbunit cleans up in the correct order.
<tablename />


On Fri, Dec 30, 2011 at 8:37 AM, Robert Eikermann
<[hidden email]> wrote:

> They are filled during my JUnit Tests and then the cleanup will cause the
> error.
>
>
>
> Von: Andy Stevens [mailto:[hidden email]]
> Gesendet: Freitag, 30. Dezember 2011 09:15
> An: [hidden email]
> Betreff: Re: [dbunit-user] foreign key violation
>
>
>
> If the other tables aren't being filled by the xml dataset, then what are
> they filled by?
>
> Andy.
>
> On 30 Dec 2011 01:11, "Robert Eikermann" <[hidden email]>
> wrote:
>
> Hi,
>
> I have a problem with foreign key violations in my tests. This
> (http://www.dbunit.org/faq.html#tableseq) helped me already a lot but:
>
> When tables will be filled during the test which are not filled by the
> dataset XML-File the DatabaseSequenceFilter will not work for those tables
> and I get the foreign key error. I think the DatabaseSequenceFilter sorts
> only the tables (accordingly the foreign keys) which are in the Dataset and
> not all tables of the Database. My first approach is to use all tables in
> the Dataset which will be used in the tests, but is there another/better
> solution?
>
>
>
> Thank you for your help!
>
>
>
> Best regards
>
> Robert
>
>
> ------------------------------------------------------------------------------
> Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
> infrastructure or vast IT resources to deliver seamless, secure access to
> virtual desktops. With this all-in-one solution, easily deploy virtual
> desktops for less than the cost of PCs and save 60% on VDI infrastructure
> costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
>
> ------------------------------------------------------------------------------
> Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
> infrastructure or vast IT resources to deliver seamless, secure access to
> virtual desktops. With this all-in-one solution, easily deploy virtual
> desktops for less than the cost of PCs and save 60% on VDI infrastructure
> costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>

------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: foreign key violation

Robert Eikermann-2
Thanks !
Not Null constraints seems not to be violated with this empty table entries,
and with http://www.dbunit.org/faq.html#tableseq the ordering in the dataset
doesn't matter.

-----Ursprüngliche Nachricht-----
Von: Jeff Jensen [mailto:[hidden email]]
Gesendet: Freitag, 30. Dezember 2011 17:30
An: [hidden email]
Betreff: Re: [dbunit-user] foreign key violation

Add empty table entries to the xml file for those tables with no prep data
so dbunit knows to clean them up too.  Place them in the correct order with
the other tables so dbunit cleans up in the correct order.
<tablename />


On Fri, Dec 30, 2011 at 8:37 AM, Robert Eikermann
<[hidden email]> wrote:

> They are filled during my JUnit Tests and then the cleanup will cause
> the error.
>
>
>
> Von: Andy Stevens [mailto:[hidden email]]
> Gesendet: Freitag, 30. Dezember 2011 09:15
> An: [hidden email]
> Betreff: Re: [dbunit-user] foreign key violation
>
>
>
> If the other tables aren't being filled by the xml dataset, then what
> are they filled by?
>
> Andy.
>
> On 30 Dec 2011 01:11, "Robert Eikermann"
> <[hidden email]>
> wrote:
>
> Hi,
>
> I have a problem with foreign key violations in my tests. This
> (http://www.dbunit.org/faq.html#tableseq) helped me already a lot but:
>
> When tables will be filled during the test which are not filled by the
> dataset XML-File the DatabaseSequenceFilter will not work for those
> tables and I get the foreign key error. I think the
> DatabaseSequenceFilter sorts only the tables (accordingly the foreign
> keys) which are in the Dataset and not all tables of the Database. My
> first approach is to use all tables in the Dataset which will be used
> in the tests, but is there another/better solution?
>
>
>
> Thank you for your help!
>
>
>
> Best regards
>
> Robert
>
>
> ----------------------------------------------------------------------
> -------- Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't
> need a complex infrastructure or vast IT resources to deliver
> seamless, secure access to virtual desktops. With this all-in-one
> solution, easily deploy virtual desktops for less than the cost of PCs
> and save 60% on VDI infrastructure costs. Try it free!
> http://p.sf.net/sfu/Citrix-VDIinabox
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>
>
> ----------------------------------------------------------------------
> -------- Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't
> need a complex infrastructure or vast IT resources to deliver
> seamless, secure access to virtual desktops. With this all-in-one
> solution, easily deploy virtual desktops for less than the cost of PCs
> and save 60% on VDI infrastructure costs. Try it free!
> http://p.sf.net/sfu/Citrix-VDIinabox
> _______________________________________________
> dbunit-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/dbunit-user
>

----------------------------------------------------------------------------
--
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user