I'm dont think you can map one type to many tables. You can map extents where you have more than one subclass, each mapped to a different table, and then access the extent type - but i dont think it will like mapping multiple tables to the exact same type.
I am, however, fairly sure that you can create mappings at runtime - not sure how though. Have to see what anyone else suggests, but I think that you might be better off writing jdbc based DAOs! Daniel. > -----Original Message----- > From: Peter Guarnieri [mailto:[EMAIL PROTECTED] > Sent: 06 December 2004 16:24 > To: [EMAIL PROTECTED] > Subject: db with many tables > > > Hey all, > I'm currently trying to write a Java program to suck out a whole > heap of data from an MsSQL db which is the backend of an MS > SharePoint portal. Sharepoint stores data for each new "list" > created by creating a new table. So every time someone creates a > new list of documents for exampele, a table is created, named > ProjectXXX_nameoflist. I want to have a Java class to represent > a particular kind of table. For instance, they'll be a > DocumentBean for tables in the db that stores information about a > list of documents. How can I set something like this up with > OJB? How do I have one Java class map to a dynamically determined > number of tables? Is there some way to fill in the table name at > runtime? There's no way to know beforehand what the names of the > tables will be; right now I'm running some queries on the > sysobjects table to figure that out. Does anyone know of any > method for doing this? > > Peter > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
