views:

33

answers:

0

This further to my previous question on handling large numbers of objects in BigTables/JDO.

Assuming a TransactionAccount could end up with as many as 10,000 objects in its transactions list, how does this work with Goodle app engine?

How do you add objects to such a large list without the whole list being loaded into memory? (The assumption is that 10,000 objects shouldn't be loaded into memory?)

I am not trying to ask you how to do my homework, I just have no idea where to start to solve this, the app engine documentation and google searching is not helping :(

// example only, not meant to compile
@PersistenceCapable
public class TransactionAccount {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    public Key key;
    private long balance;
    private long transactionCount;
    @Element(dependent = "true")
    private List<Transaction> transactions = new ArrayList<Transaction>();
    ....
    public long getBalance() { return balance; }
}

@PersistenceCapable
private class Transaction {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    public Key key;
    public Date date;
    public long amount;
}

This question is raised but not resolved in the following google groups post.