> But what's the whole point of being able
> to fetch additional join table fields by setting the "with" attribute
> in the HABTM definition but not being able to update these fields
> without creating a model?

I think you're seeing this the wrong way around. The point of the
`with` attribute is to make the HATBM relationship more than just a
link, to make it an actual object in its own right. Having a `with`
attribute implies that the relationship IS a model. Not having one
implies that it's just a link between other models.

However, you don't need to actually create a model class file to do
this. You can create one, or cake will instantiate a new `AppModel`
instance for you. Either way you can access $this->GamesUser [or
whatever your `with` attribute is called] from within the Game or User
model, and call save() or updateAll() on it.

> Of course I could always write a custom query to update this data but
> it's is a really ugly solution and I want to stay as clean as
> possible, if you know what I mean. ;)

You really don't need to, just call $this->GamesUser->save() [or
updateAll()] from within the User model code.

> Is there something I overlooked or do I really have to create a model
> for the join table?

You can create a model *class* (by creating a class file) if you
require it, but you don't have to.

Cake will automatically create a model *instance* for you [whether you
create a class or not], you just have to use it.

> Thanks for reading, I'd appreciate any help. Have a nice day. :)

I hope this helps.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to