Subject: Apache ISIS - Store multiple selected values into Single column in database


Hi Roshan,

whenever I have such a use-case as you described (multiple values in one
column), I do the following ...

Split the the property (in your case the 'doorTypes') into 2 parts:

1) visible part as rendered by Isis (make this transient: @NotPersistent)

@NotPersistent
List<DoorType> getDoorTypes(){
// parse field 'doorTypesStringified' ...
}

void setDoorTypes(List<DoorType> doorType){
// update field 'doorTypesStringified' ...
}

// add support methods here ...
2) hidden part as persisted by JDO (exemplified with 'String', but you
can choose whatever you like)

@PropertyLayout(hidden=Where.EVERYWHERE)
@Getter @Setter @Column(allowsNull="true")
String doorTypesStringified;

Regards, Andi

On 2018/02/01 07:40:27, Roshan Vishwakarma <[EMAIL PROTECTED]> wrote:
column.>