@Override
    public Object clone() {
        Object clonedObject;
        try {
            clonedObject = super.clone();
            TransactionRecord t = (TransactionRecord)clonedObject;
            if (account != null)
                account.addReference();
            if (transferAccount != null)
                transferAccount.addReference();
            if (category != null)
                category.addReference();
            if (security != null)
                security.addReference();
            if (splits != null)
                t.splits = TransactionSplit.copySplits(splits);
        } catch (CloneNotSupportedException exc) {
            throw new UnsupportedOperationException("Unable to clone transaction", exc);
        }

        return clonedObject;
    }