Can we add a Bin dynamically to a Aerospike Model

@AerospikeEntity(nameSpace = Constants.NAMESPACE, setName = Constants.NDC_SET)

public class NDCModel implements Serializable {

private static final long serialVersionUID = 1L;
private String cycle;
private long  debitAmount;
private long  creditAmount;


This is my aerospike model .Suppose apart from cycle ,debitAmount,creditAmount ,i want to store a 4th bin dynamically during run time is it possible in Aerospike ?When i will do get on my key i should get 4th variable also :- aerospikeOperations.get(key, NDCModel.class)

You can definitely add any number of bins dynamically as part of updates to existing records. Simply update the records with their respective bins. New bins will be added and existing ones will be updated. You would then retrieve all the bins when reading (or specific ones if you only request some of the bins).

© 2021 Copyright Aerospike, Inc. | All rights reserved. Creators of the Aerospike Database.