Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Domaintype must not be null exception #9

Open
Rickvanderwaal opened this issue Feb 19, 2016 · 1 comment
Open

Domaintype must not be null exception #9

Rickvanderwaal opened this issue Feb 19, 2016 · 1 comment

Comments

@Rickvanderwaal
Copy link
Contributor

When mapping integers, the IdToEntityBeanConverter want to kwow if there is a repository for the given targetClass.
By checking this there is a exception thrown.

@Rickvanderwaal
Copy link
Contributor Author

Solution in IdToEntityBeanConverter.class:

@Override
public boolean match(Class<?> sourceClass, Class<?> targetClass) {
        boolean match = false;
        try {
            EntityInformation<Object, Serializable> information = repositories.getEntityInformationFor(targetClass);
            if (information != null) {
                match = sourceClass.equals(information.getIdType());
            }
        } catch (Exception e) {
            return false;
        }
        return match;
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant