[TYPO3-mvc] How to add a unique/primary key property to a manually created domain model?
Jan Kornblum
jan.kornblum at gmx.de
Sat Feb 16 16:52:27 CET 2013
Hi Henjo,
i've already thought that i would mix up any different things...
> you are updating the basket in your session, which is not the same as in
> persistence. Make a choice to either save it to the session - or to the
> persistence layer.
> Since your basket is not run through the persistence layer in your code, it
> is not persisted there. You are trying to mix both approaches here.
> Stick with one of the two.
That means that i cannot take "usual" domain objects which are
persistable (the products) and "put them" into my own "persistence
layer" (in this case the session-stored basket)? Is this correct to
say?
So in this case my basket must have to be a real persistable basket
(domain model with repository, underlaying database tables, and so on),
is this also correct?
> Summarising: Updating your basket in session is not the same as in
> persistence.
But what i absolutely don't understand is, why i can *add* products to
my session-stored basket, but not *remove* products?
-- CUT ---
Indepemdent from above:
> Why not save the uid's and the amount of products to a session and write a
> service or utility class to do CRUD on the session cookie?
I've got it easily running now using this approach, as you've
suggested. This is very nice with extbase that it doesn't take much
time to change an approach and do it completely different :) This
really makes fun...
Nice weekend, Jan
More information about the TYPO3-project-typo3v4mvc
mailing list