>> On Sat, Jul 19, 2008 at 11:50 PM, Julien Phalip <[EMAIL PROTECTED]> wrote:
>> >
>> Oops - sorry, I wasn't very clear in my original request.  I'm looking
>> for a set type in the Django model hierarchy.  Does this make more
>> sense?
>
> A set is just an unordered collection of objects. In other words, it's
> the rows in a database table, so it's instances of a Django model. Thus,
> if you want to model a set, you can use a many-to-one relation
> (ForeignKey) or a many-to-many relation.

I had figured that this might be the way to accomplish what I'm doing.
 What I'm really looking for is something in the model structure that
would make use of a MySQL "set" type.

Basically, I have an object where an attribute is a set of codes
(strings for all practical purposes).  These items don't really
warrant their own class - it's truly a set that is an attribute of a
class.

If I have to implement it as a many to many relationship with another
class, then that's how it is.  I suppose I could also do it as a bunch
of named boolean attributes in the original class, but that somehow
feels more hackish.

-- 
Cole Tuininga
http://www.tuininga.org/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to