Closed GoogleCodeExporter closed 9 years ago
I forgot to say that the database used by the project is empty, so fixing the
mapping should produce JDBC errors anyway, but this is outside the scope of
this issue.
Original comment by riccardo...@gmail.com
on 20 Sep 2010 at 10:27
how to resolve this issue? anyone knows? could you please help me?
Original comment by iamba...@gmail.com
on 21 Feb 2011 at 2:42
I'm having the same issue. Essentially i have a generic ID property that can
be a Long and in the near future some other primitive type. What is happening
is that i have a base class that has a generic Id type. The mapper isn't
setting the id property in the base class because its not of a primitive type.
my work around is to have the subclass override the id getter and setter to
return and accept a primitive value.
see below for reference:
public class Base<T extends Serializable> {
T id;
T getId();
void setId( T id );
}
---------------------------
public class Sub extends Base<Long> {
Long getId();
void setId( Long id );
}
---------------------------
<resultMap id="test" type="Sub">
<result property="id" column="id"/>
</resultMap>
---------------------------
Original comment by steven.w...@gmail.com
on 25 May 2011 at 8:36
any updates available for this issue yet?
Original comment by steven.w...@gmail.com
on 5 Jul 2011 at 3:59
Riccardo. I have tried with 3.1.0 and MyBatis fails telling that namespaces are
wrong. After fixing that there is a JDBC error telling that a table was not
found.
Anyaway it seems that generis are working (don't know if that has always worked
or if it has been fixed by chance). You can try with the patch attached
Original comment by eduardo.macarron
on 14 Jan 2012 at 10:59
Attachments:
Original issue reported on code.google.com by
riccardo...@gmail.com
on 20 Sep 2010 at 10:23Attachments: