Re: Newbie Question: Mapping a Collection of Strings

2009-08-25 Thread Matt Kerr
Hey Bret - Unless I'm missing - yes, this is right on the mark for cayenne. If you have an existing database, the easiest is to create a new model and use Tools -> Re-engineer Databae Schema, ie http://cayenne.apache.org/doc/reverse-engineer-database.html Note- I find there a few quirks in t

Newbie Question: Mapping a Collection of Strings

2009-08-25 Thread Bret Gregory
I have a DB that looks something like this: Product -ProductId -Description Keyword -ProductId -Keyword Where Product -> Keyword is 1:N and Keyword has a FK rel back to Product. I would like the object model to look something like this: Product -(String) _description -(List) _keywords Is

Re: ObjRelationship Inspector Tool

2009-08-25 Thread Andrus Adamchik
The docs page is dated even for 2.0.4... There's an icon with an "I" in a circle in the relationship tab. It can be seen in this screenshot: http://cayenne.apache.org/doc20/tutorial-object-relational-mapping.data/modeler-dbrel-dialog.jpg On a side note the dialog for relationship flattenning

ObjRelationship Inspector Tool

2009-08-25 Thread Nishant Neeraj
Hi, It is rather dumb question to ask I have Cayenne Modeler Version 2.0.4. I want flatten the link table in Object Model (for many to many relationship) using ObjRelationship Inspector mentioned here [1]. I could not find how to reach to this tool. Can someone tell me where this tool can be r

Re: Simple Select Query

2009-08-25 Thread Aristedes Maniatis
On 25/08/09 6:23 PM, Null kühl wrote: yes, but imagine if it's a huge table, performance wise, ill be reading the whole table from the db, all columns and all rows.then throw away all the data except for a certain column, would it have a vast effect on performance if i just constrain the reading

Re: Simple Select Query

2009-08-25 Thread Andrey Razumovsky
Yes, the query I mentioned will return List (and if the objAttrubute you select is mapped as Integer, it will return List). Also you can specify several columns, then result will be List 2009/8/25 Null kühl > would that query return only the column name from the client table ? also > the return

Re: Simple Select Query

2009-08-25 Thread Null kühl
yes, but imagine if it's a huge table, performance wise, ill be reading the whole table from the db, all columns and all rows.then throw away all the data except for a certain column, would it have a vast effect on performance if i just constrain the reading from the beginning ? On Tue, Aug 25, 20

Re: multiple project configurations

2009-08-25 Thread Andrus Adamchik
Hi, 1. How can I configure cayenne to use *more configurations*/ projects? I don't want always to merge framework's domains with webapp's ones for every new project/deployment. Auto merge of multiple configurations is on the TODO lист, but don't have ит currently. So you'll have to do it yo

Re: Simple Select Query

2009-08-25 Thread Aristedes Maniatis
On 25/08/09 5:29 PM, Null kühl wrote: also the return of such a query will be a list of clients as List c; , or since am querying for a certain field it can be something like List names; Although you can do what you want by returning DataRows, I strongly advise you avoid that approach while

Re: Simple Select Query

2009-08-25 Thread Null kühl
would that query return only the column name from the client table ? also the return type will be an object of type client ? is there anyway that i can retrieve from this sorta query a list of strings if am querying for a name or a list of integers if am querying for a numeral value ? On Tue, Aug

Re: Simple Select Query

2009-08-25 Thread Andrey Razumovsky
Hi, You can use EJBQLQuery for that, something like "select c.name from Client c", where Client is a mapped ObjEntity. http://cayenne.apache.org/doc/ejbqlquery.html Regards, Andrey 2009/8/25 Null kühl > I would like to do have a list of of a certain column in a certain table, > by > sql langua

Simple Select Query

2009-08-25 Thread Null kühl
I would like to do have a list of of a certain column in a certain table, by sql language that means something like SELECT name FROM `client` c; it's my first time to use cayenne and i searched a lot in it's manual for doing such a query and the only way that was kind of close is writing the quer