Re: [EoDsql-users] Unsupported operation
Status: Beta
Brought to you by:
lemnik
|
From: Jason M. <le...@gm...> - 2008-10-20 06:29:49
|
Ricardo Palomares wrote:
> Hi,
>
> I've switched to EoD-SQL 2.0beta to solve a problem with 1.1,
> following recommendations by Jason (BTW, Jason, I don't know if you
> did it on purpose, but your answers were directed straight to my
> e-mail address, bypassing the list).
>
> All I have had to touch due to the upgrade has been changing a
> @SelectPrimitive annotation to @Select. That's good. :-)
>
> But now I get an exception in a code point that was working before,
> with EoD SQL 1.1:
>
> Caused by: java.lang.UnsupportedOperationException: Not supported yet.
> at
> net.lemnik.eodsql.spi.util.MutableProperty.set(MutableProperty.java:39)
> at
> net.lemnik.eodsql.spi.util.DefaultDataObjectBinding.unmarshall(DefaultDataObjectBinding.java:231)
> at
> net.lemnik.eodsql.spi.util.DataObjectBinding.unmarshall(DataObjectBinding.java:158)
> at
> net.lemnik.eodsql.spi.util.DisconnectedDataSet.<init>(DisconnectedDataSet.java:33)
> at
> net.lemnik.eodsql.spi.util.DataSetWrapper.wrap(DataSetWrapper.java:128)
> at
> net.lemnik.eodsql.spi.util.DataSetWrapper.wrap(DataSetWrapper.java:33)
> at
> net.lemnik.eodsql.impl.SelectMethodImplementation.invoke(SelectMethodImplementation.java:84)
> at
> net.lemnik.eodsql.impl.BaseQueryImpl$MethodImpl.invoke(BaseQueryImpl.java:172)
> at
> net.lemnik.eodsql.impl.BaseQueryImpl.invoke(BaseQueryImpl.java:118)
> at $Proxy6.getAllL10ns(Unknown Source)
>
>
> The definition of getAllL10ns is this one:
>
> public interface L10nQuery extends BaseQuery {
> // Tried also with value="..." instead of sql="..."
> @Select(sql="SELECT * FROM l10n ORDER BY l10ncode",
> disconnected=true)
> public DataSet<L10n> getAllL10ns();
>
> @Select("SELECT count(*) FROM l10n")
> public int getCountL10ns();
> ...
> }
>
> and it's called in a code like this:
>
> public class L10nList {
> private final L10n.L10nQuery pst;
>
> public L10nList() {
> super();
> pst =
> QueryTool.getQuery(Statics.getInstance().getDbEnv().getDataSource(),
> L10n.L10nQuery.class);
> this.refreshList();
> }
>
> public final void refreshList() {
> if (pst.getCountL10ns() > 0) { // This works
> l10nCol = pst.getAllL10ns(); // This throws the exception
> l10nCol.disconnect();
> }
> }
>
>
> I guess I've managed to reach a "work in progress" part of the EoD SQL
> code? :-)
>
> TIA
>
Heya Ricardo,
Sorry, I was away for the weekend. That bug was reported just before I left by
Julien Redondo and has been patched in SVN. Right now SVN has many many bugfixes
that are /not/ in the 2.0-beta release.
I would point out that under most conditions, the EoD SQL 2.0 will quite happily
work with non-public fields. Thus, unless you are doing some validation / type
conversion or some such in your setter method, you can have it set the field
directly.
So a general question arises:
1) do I make a release 2.0-gamma?
2) do I leave things as they are until EoD SQL is ready for a 2.0-rc1 release?
3) do I make the 2.0-rc1 release now?
Anyone who has an opinion, now is the time to state it!
Sorry for all the bugs and problems recently, but that's why the code is
currently in a beta state ;)
Cheers ;)
Jason.
|