Hi,
is there any flattend attribute in project? In that case you will get
'duplicates' through the toMany relationships.
If not, try spec.setUsesDistinct(true).
To trace in the generated SQL statements, go to Open Run Diolag in
Eclipse, select your application and activate
NSLog.DebugGroupDatabaseAccess and NSLog.DebugGroupEnterpriseObject. Now
you can follow the statement send to the database.
Stefan
Yury Peskin schrieb:
List,
I have a weird model issue.
When I load the database in my application some entities show up double.
For example, I load a projectDisplayGroup and I only want to see
projects that are not complete.
In my (oh so appropriately named) viewProjects class constructor, I do
the following:
Integer status = new Integer(2);
NSMutableArray args = new NSMutableArray();
args.addObject(status);
EOEditingContext ec= session().defaultEditingContext();
EOQualifier qual = EOQualifier.qualifierWithQualifierFormat(“status !=
[EMAIL PROTECTED], args);
EOFetchSpecification spec = new EOFetchSpecification(“Project”, qual,
null);
spec.setRefreshesRefetchedObjects(true);
EODatabaseDataSource ds =
(EODatabaseDataSource)projectDisplayGroup.dataSource();
ds.setFetchSpecification(spec);
projectDisplayGroup.fetch();
My database does not have any duplicates in it, but my viewProjects
page shows a duplicate entries as can be seen by the screen shots I’ve
attached.
Anybody have any ideas on what could be causing the problem?
Thank you in advance,
Yury Peskin
------------------------------------------------------------------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/stefan.klein%40buero-sde.de
This email sent to [EMAIL PROTECTED]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]