Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to add test data? (Like seeders in Rails or Laravel)  RSS feed

Christian Wansart
Ranch Hand
Posts: 32
Firefox Browser Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have a simple Java EE application with JSP and JPA. I switched from RESOURCE_LOCAL to JTA in my persistence.xml.

I tried to inject an EntityManager in my Order entity, which returns a list of orders. Before the switch to JTA I checked if there were any data. If not, I simply added some test data. Now it no longer works.

Now I am trying to find a way to add the test data to my database. Is there any common way?

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!