Skip to content

Pho does not support inheritance #17

@ssiddiqu

Description

@ssiddiqu

I created a class hierarchy and when saving an object of the subclass, it does not actually set the values for the columns that correspond to the attributes of the super class. The issue is in the following line:
com.eharmony.pho.mapper.EntityPropertiesMappingContext
private Set buildEntityPropertiesSet(Class<? extends Object> clz, String parentProperty) {

Set<EntityPropertyBinding> entityPropertiesSet = new HashSet<EntityPropertyBinding>();

133 Field[] fields = clz.getDeclaredFields();
Because it uses getDeclaredFields is only sees the fields in the current class. This should be using getFields().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions