I'm curious about the trade offs between JDO and JPA. Seems to me that JDO will perform better and be statically typed. For example: Assume there are Customers and Orders. with JDO I would do this:
@PersistenceCapable class Customer { Vector <Order> orders; } class Order { }
Whereas with JPA I tend to do this:
@Entity class Customer { } class Order { Customer customer; }
So, with the JDO version, to get the orders for a customer, I do this:
customer.getOrders ();
Whereas with JPA, I do this:
em.createQuery ("SELECT o FROM Order o WHERE o.customer="+c).getResultList();
QUESTION: Apart from the loss of static typing with the JPA version, is there a performance hit? ie: with the JDO version you have essentially an index from the Customer class to its Orders, while with the JPA version you have to query the database.