Hi,
If you want to retrieve list of related models with one to many
relation, you can do it with related manager, without adding a field
to model A.
So, if you have model B like this:

class B(models.Model):
 a = models.ForeignKey(A)

you can get related B objects like this: a_instance.b_set.all()

But if you want to have an array field in your model (so that array
data will be stored in the same table that stores model data), your db
backend must support it and you must extend Django to support this
functionality. That's probably not what you want.

2012/3/19 Xavier Pegenaute <xpegena...@telepolis.es>:
> Hi,
>
> I was thinking to use a field like a list [] of another object. But I have
> no a clear idea which field type should I use. Any idea?
>
> Ex:
> class A:
>    bClasses = models.XXXX() # list of Foreign keys from B
>
>
> I am not looking for a ManyToMany Field.
>
> Thanks,
> Xavi
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

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

Reply via email to