Skip to main content

JPA best practice advice

2 replies [Last post]
r01012001
Offline
Joined: 2010-07-08

I have oracle database which has two schemas A and B. There are around 20 tables under schema A and 50 tables under schema B. One of our developer generated a package

com.mycode under which he/she put all 70 entity classes for all tables. My question is - Should we logically separate as follows

com.mycode.schemaA...
com.mycode.schemaB...

or just leave it as all entities under com.mycode ?

What are pros and cons of doing one versus the other one. Any help would be appreciated

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
terminaljack
Offline
Joined: 2010-08-05

You should separate those so you have more control over each entity. It may be more work but it's how you succeed.

r01012001
Offline
Joined: 2010-07-08

Thanks. I will split package.