aspose file tools*
The moose likes JForum and the fly likes Constraint violations in mysql when running DOA tests Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "Constraint violations in mysql when running DOA tests" Watch "Constraint violations in mysql when running DOA tests" New topic
Author

Constraint violations in mysql when running DOA tests

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi:

I've been getting familiar with the code and tried running the DOA JUnit tests against mysql.
I get some constraint violations because of null values. (For example user id in AttachmentInfo when it's inserted in AttachmentDAOTestCase.getNewAttachment()).

To remedy this, would it be best to update the test cases to fulfill those constraints or remove the constraints from the mysql structure? I would think the best action would be to update the test cases, since the constraints seem valid.

In one case it seemed to be some kind of circular dependency. Where jforum_topics required a topic_last_post_id and jforum_posts required a topic_id. Is there some way for hibernate and mysql could deal with those types of constraints?

Like I said, I'm just getting familiar with things, and trying to determine if I'd be able to contribute.

(There were also a couple typos in the mysql struct file, but they were easy to find and fix.)

-Martin
[originally posted on jforum.net by mlovell]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Yes, the code / db structure should be enhanced. As at the moment a lot of code is being rewritten, we probably will left this task to when the model gets more table.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Constraint violations in mysql when running DOA tests