• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Error on saveChanges with WOBrowser or WOCheckBoxList
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Error on saveChanges with WOBrowser or WOCheckBoxList (From: "Sennikov, Dimitri" <email@hidden>)
 >RE: Error on saveChanges with WOBrowser or WOCheckBoxList (From: "Sennikov, Dimitri" <email@hidden>)

  • Prev by Date: Re: Converting from one subclass to another
  • Next by Date: mySQL 5
  • Previous by thread: Re: Error on saveChanges with WOBrowser or WOCheckBoxList
  • Next by thread: Using wobuild.properties to switch between WO 53 and WO 54. Was: WebObjects 5.4 is out.
  • Index(es):
    • Date
    • Thread