Is there a sample code that shows how to store and retrieve List fields?
just create a class with, for example, a List. Example:
public class Order{ ... List items; ... }
Then:
ODatabaseObjectTx db = new ODatabaseObjectTx("local:/temp/db");
db.create();
db.getEntityManager().registerEntityClass(Order.class);
db.getEntityManager().registerEntityClass(OrderItem.class);
Order o = new Order(234);
o.items = new ArrayList<OrderItem>();
o.items.add( new OrderItem('mouse', 10, 12.5) );
db.save( o );
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With