Hi Steven,

This is exactly right. The GenericQueryManager is built on top of the DbQueryManager. In the current implementation you can actually just cast the GenericQueryManager to the DbQueryManager but that is quite ugly.

So what you are doing is the best way.

Best regards,

Geert

On 16 Jul 2006, at 08:07, Steven Grimm wrote:

Answering my own question after digging around some more:

CreateTable ct = ...
DbQueryManager qm = new DbQueryManager(dataSource);
qm.executeUpdate(ct);

If there's a better way, I'm all ears, but that seems to work.

-Steve


Steven Grimm wrote:
What's the official way to create a table that's not associated with a bean? I have a join table for a many-to-many association whose columns are just the IDs of the two tables being joined. Obviously I can go into my DB admin tool and create the table by hand or do it with JDBC, but I want to try it the RIFE way if I can.

I can get this far:

CreateTable ct = new CreateTable(dataSource);
ct.table("shows_watched")
   .column("userid", int.class)
   .column("showid", int.class)
   .primaryKey(new String[] { "userid", "showid" })
   .foreignKey("user", "userid", "userid")
   .foreignKey("show", "showid", "showid");

But then what do I do with that CreateTable object? I see I can pass it to GenericQueryManager, but I don't have a GenericQueryManager because I don't have a bean class.

Or am I going about this completely wrong?

-Steve
_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users


_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users


--
Geert Bevin
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com


_______________________________________________
Rife-users mailing list
[email protected]
http://lists.uwyn.com/mailman/listinfo/rife-users

Reply via email to