Problems with Dumb

All fixed.

First, it's common to want to do this...

Select * from Table1 join Table2 on Table1.ID = Table2.Table1ID where Table2.Something = whatever.

That now works in dumb by doing simply the following:

Table1 t = new Table1();
Table2 t2 = new Table2();
t2.setSomething(whatever);
t.setTable2(t2);

engine.load(t);


So it'll select everything from Table1 where a certain condition on Table2 is true. Like, selecting polls where a poll answer contains 'The'. Of course, this works in filters because the filter is actually generating its own SQL. Saving that object was never a problem, that's been a part of dumb since the old days, over a year ago.

Another problem I had... it's very common to have a table like this:

table UserFriend {
userId int not null,
friendId int not null,
constraint foreign key userId references (User) userId,
constraint foreign key friendId references (User) userId
}


Two fields are references to the same table. Before, my generated sql code would pretty much only work if no table was joined more than once, either from the same initial table, or later on down the joined road. Now, I can have any number of references to the same table either in the initial table or down the road. It all works now. It's beautiful.

Anyway, I'm still chugging away at the... oh wait, that last game update was the last one.

blog comments powered by Disqus