Menu

#220 Exception saving Entity->Embeddable->Read only member

v4.3.1
closed
nobody
None
5
2011-12-21
2011-09-01
JM
No

Exception when saving an Entity instance that includes an Embeddable one with calculated members.

Details, code and exceptions at:

https://sourceforge.net/projects/openxava/forums/forum/419690/topic/4626451/index/page/1

Discussion

  • Javier Paniza

    Javier Paniza - 2011-12-21
    • milestone: 2076243 --> v4.3.1
    • status: open --> closed
     
  • Javier Paniza

    Javier Paniza - 2011-12-21

    To fix it was only needed to add a call to removeCalculatedFields() in instanceAggregate() of MapFacadeBean:
    private Object instanceAggregate(MetaAggregateForReference metaAggregate, Map values)
    throws ValidationException, XavaException, RemoteException {
    try {
    Object object = Class.forName(metaAggregate.getBeanClass()).newInstance();
    PropertiesManager man = new PropertiesManager(object);
    removeViewProperties(metaAggregate, values);
    removeCalculatedFields(metaAggregate, values); // THIS LINE FIX THIS BUG
    values = convertSubmapsInObject(metaAggregate, values, false);
    man.executeSets(values);
    return object;
    } catch (ClassNotFoundException ex) {
    ...

     

Log in to post a comment.