On Thu, Jun 21, 2012 at 08:44:18PM +0200, Petr Jakeš wrote: > Acording the unique m.id: generally it depends about the construction of > your select. In my example I am pretty sure it returns unique IDs only.
Obviously, if you only have many-to-one relationship (from left to right) you can just use the ID of the left hand table. AFAICS that must be your case. My problem is that the join involves two many-to-many relationships, so I cannot even use the ID's of the relation table. > I did not find solution, how to solve above mentioned SELECT using the > SQLObject. Even using raw SELECT. > I mean something like: result = con.queryAllDescription("rawSqlQuerry"). > Because of that I am using views and it works. As far as I can see, you could do the same with the ViewSQLObject class. > > However, the real challenge, whether the view is defined client > > side or server side, is to construct the unique and immutable ID > > which SQLObject requires. > > In the Firebird, AFAIK, the views are immutable. Anyway, I am using it > just to dig the data out from the database. I was talking about the ID, or primary key in SQL terms. A view does not need one, but an SQLObject class does (according to the doc's). Making it immutable is hardly the problem here; the challenge is uniqueness. > I did not find pure SQLObject solution for complex queries and I think > SQLObject is not intended for that. Judging by the doc's, ViewSQLObject is intended to do some of that, but you are right that SQLObject encourages client side solutions. -- :-- Hans Georg ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss