Re: Error on saveChanges with WOBrowser or WOCheckBoxList
Re: Error on saveChanges with WOBrowser or WOCheckBoxList
- Subject: Re: Error on saveChanges with WOBrowser or WOCheckBoxList
- From: Alexander Spohr <email@hidden>
- Date: Thu, 14 Feb 2008 09:47:57 +0100
Am 12.02.2008 um 14:14 schrieb Sennikov, Dimitri:
I only have 1-to-many, a user can be a part of several departments
whereas department has no relationship with any user from its side.
Are you sure, your model has a relationship?
It sounds, like you try to have an NSArray as a column, not as a
relationship?
From Entity Modeler, the relationship is represented by departmentIDs
column with the following settings:
A COLUMN can not be a relationship.
Prototype - mutableArray
External Type - BLOB
Allows Null - is set
Data Type - Custom
What is that for?
Do you want to store the names of your departments in that?
Class - er.extensions.ERXMutableArray
Factory Method - fromBlob
Conversion Method - toBlob
Are you converting the blobs somewhere? What do they contain?
Here's my WOBrowser object:
DepartmentList : WOBrowser {
list = departmentDisplayGroup.displayedObjects;
item = department;
displayString = department.name;
selections = user.departments;
Is user.departments your blob? That will not work.
multiple = true;
size = 6;
}
A relationship is a join, not a column.
Your following sentence is not true:
I only have 1-to-many, a user can be a part of several departments
whereas department has no relationship with any user from its side.
If one user can have many departments and multiple users can have the
same departments, you have a n-m, and nothing else.
You need a m-n table in your database (USER_DEPT) and connect User and
Department with a 1-n to it.
atze
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden