• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Constraint violations in mysql when running DOA tests

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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]
 
eat bricks! HA! And here's another one! And a tiny ad!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic