arnaudroger / SimpleFlatMapper

Fast and Easy mapping from database and csv to POJO. A java micro ORM, lightweight alternative to iBatis and Hibernate. Fast Csv Parser and Csv Mapper
http://simpleflatmapper.org
MIT License
440 stars 76 forks source link

Wrong behaviour using ignorePropertyNotFound() with joins and discriminator. #707

Open n1b0r opened 4 years ago

n1b0r commented 4 years ago

Hello,

Again, thanks for this great library !

I'm getting troubles using a mapper with joins (addKeys()), discriminator() and ignorePropertyNotFound().

Here is a test to reproduce the issue.

    public class M {
        public Integer id;
        public String type;
        public List<V> v;
        public List<T> t;

        @Override
        public String toString()
        {
            return "M{" +
                    "id=" + id +
                    ", v=" + v +
                    ", t=" + t +
                    '}';
        }

        public M()
        {
        }
    }
    public class M2 extends M {
        public List<S> s;

        @Override
        public String toString()
        {
            return "M2{" +
                    "id=" + id +
                    ", type='" + type + '\'' +
                    ", v=" + v +
                    ", t=" + t +
                    ", s=" + s +
                    '}';
        }

        public M2()
        {
        }

    }
    public class V {
        public Integer id;
        public V()
        {
        }

        @Override
        public String toString()
        {
            return "V{" +
                    "id=" + id +
                    '}';
        }
    }
    public class S {
        public Integer id;
        public S()
        {
        }

        @Override
        public String toString()
        {
            return "S{" +
                    "id=" + id +
                    '}';
        }
    }
    public  class T {
        public Integer id;
        public T()
        {
        }

        @Override
        public String toString()
        {
            return "T{" +
                    "id=" + id +
                    '}';
        }
    }

    public static void main(String[] args) throws SQLException
    {
        JdbcMapper mapper = JdbcMapperFactory
                .newInstance()
                .addKeys("id","v_id","t_id","s_id")
                .discriminator(M.class).onColumn("type", String.class).with(b->b.when("type1", M2.class).when(x-> true, M.class))
//              .ignorePropertyNotFound()
                .newMapper(M.class);

        DataSource datasource = new DataSource();
        datasource.setUrl("jdbc:postgresql://<host>:5432/<table>?user=<user>");

        String query = "SELECT * FROM (\n" +
                " select 9675 as id, 162 as v_id, 564681 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564681 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564681 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564681 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564682 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564682 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564682 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564682 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564683 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564683 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564683 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564683 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564684 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564684 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564684 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564684 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564685 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564685 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564685 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564685 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564686 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564686 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564686 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564686 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564687 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564687 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564687 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564687 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564688 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564688 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564688 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564688 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564689 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564689 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564689 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564689 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564690 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564690 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564690 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564690 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564691 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564691 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564691 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564691 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564692 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564692 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564692 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564692 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564693 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564693 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564693 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564693 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564694 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564694 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564694 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564694 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564695 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564695 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564695 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564695 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564696 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564696 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564696 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564696 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564697 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564697 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564697 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564697 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564698 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564698 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564698 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564698 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564699 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564699 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564699 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564699 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564700 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564700 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564700 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564700 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564701 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564701 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564701 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564701 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564702 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564702 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564702 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564702 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564703 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564703 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564703 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564703 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564704 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564704 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564704 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564704 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564705 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564705 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564705 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564705 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564706 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564706 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564706 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564706 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564707 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564707 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564707 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564707 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564708 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564708 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564708 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564708 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564710 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564710 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564710 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564710 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564712 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564712 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564712 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564712 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564713 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564713 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564713 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564713 as t_id, 9674 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564714 as t_id, 9671 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564714 as t_id, 9672 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564714 as t_id, 9673 as s_id, 'type1' as type\n" +
                " UNION\n" +
                " select 9675 as id, 162 as v_id, 564714 as t_id, 9674 as s_id, 'type1' as type\n" +
                ") as foo";

        try (Connection c = datasource.getConnection();
             Statement s = c.createStatement();
             ResultSet rs = s.executeQuery(query))
        {
            mapper
                    .stream(rs)
                    .forEach(System.out::println);
        }
    }

The mapper

        JdbcMapper mapper = JdbcMapperFactory
                .newInstance()
                .addKeys("id","v_id","t_id","s_id")
                .discriminator(M.class).onColumn("type", String.class).with(b->b.when("type1", M2.class).when(x-> true, M.class))
//              .ignorePropertyNotFound()
                .newMapper(M.class);

produces, as expected

M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564702}, T{id=564685}, T{id=564687}, T{id=564701}, T{id=564693}, T{id=564689}, T{id=564712}, T{id=564686}, T{id=564692}, T{id=564704}, T{id=564691}, T{id=564690}, T{id=564682}, T{id=564700}, T{id=564703}, T{id=564710}, T{id=564714}, T{id=564698}, T{id=564697}, T{id=564694}, T{id=564708}, T{id=564696}, T{id=564681}, T{id=564706}, T{id=564684}, T{id=564699}, T{id=564688}, T{id=564695}, T{id=564713}, T{id=564683}, T{id=564707}, T{id=564705}], s=[S{id=9673}, S{id=9671}, S{id=9674}, S{id=9672}]}

but the mapper (using ignorePropertyNotFound())

        JdbcMapper mapper = JdbcMapperFactory
                .newInstance()
                .addKeys("id","v_id","t_id","s_id")
                .discriminator(M.class).onColumn("type", String.class).with(b->b.when("type1", M2.class).when(x-> true, M.class))
                .ignorePropertyNotFound()
                .newMapper(M.class);

produces

M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564702}, T{id=564685}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564685}, T{id=564702}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564687}, T{id=564701}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564693}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564689}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564693}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564712}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564686}], s=[S{id=9672}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564686}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564693}], s=[S{id=9672}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564686}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564702}, T{id=564685}], s=[S{id=9672}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564692}, T{id=564702}, T{id=564685}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564692}], s=[S{id=9672}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564687}, T{id=564701}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564689}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564693}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564712}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564689}, T{id=564712}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564687}, T{id=564701}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564687}, T{id=564701}, T{id=564689}, T{id=564712}], s=[S{id=9672}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564686}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564692}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564692}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564704}, T{id=564691}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564690}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564691}, T{id=564704}, T{id=564682}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564700}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564703}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564710}], s=[S{id=9672}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564700}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564682}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564700}], s=[S{id=9672}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564710}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564710}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564682}], s=[S{id=9672}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564714}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564704}, T{id=564691}], s=[S{id=9672}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564704}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564690}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564691}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564690}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564700}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564703}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564703}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564682}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564714}], s=[S{id=9672}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564714}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564703}], s=[S{id=9672}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564710}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564714}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564690}], s=[S{id=9672}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564698}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564697}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564698}, T{id=564694}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564708}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564696}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564681}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564696}, T{id=564694}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564696}, T{id=564694}, T{id=564698}], s=[S{id=9672}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564706}, T{id=564698}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564697}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564697}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564706}], s=[S{id=9672}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564708}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564681}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564681}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564696}, T{id=564694}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564708}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564708}, T{id=564681}], s=[S{id=9672}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564706}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564697}], s=[S{id=9672}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564706}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564684}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564699}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564684}, T{id=564688}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564695}], s=[S{id=9672}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564713}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564683}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564707}], s=[S{id=9672}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564713}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564688}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564705}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564688}], s=[S{id=9672}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564695}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564707}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564707}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564713}], s=[S{id=9672}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564695}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564684}], s=[S{id=9672}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564699}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564684}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564699}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564688}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564705}, T{id=564683}], s=[S{id=9671}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564683}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564713}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564705}], s=[S{id=9673}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564695}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564683}], s=[S{id=9672}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564707}], s=[S{id=9674}]}
M2{id=9675, type='type1', v=[V{id=162}], t=[T{id=564705}, T{id=564699}], s=[S{id=9672}]}

What do you think ?

Regards, Robin.

arnaudroger commented 4 years ago

Will have a look ASAP thanks

arnaudroger commented 4 years ago

Thanks for the reproducer, managed to track the issue, will release a fix asap

arnaudroger commented 4 years ago

so for a bit of background, it is possible to had keys, ar null check that are used for grouping but not in the mapped object that would be an Optional and Key column. ignoreNotFoundProperty mark all the column as optional. so s_id endup being non mapped column. still need to figure out some more stuff