[TYPO3-mvc] How to add a unique/primary key property to a manually created domain model?

Henjo Hoeksma | Stylence me at henjohoeksma.nl
Sat Feb 16 19:41:55 CET 2013


Hi Jan,

haven't read all your code, but I suspect you actually update the session
basket inside updating your basket object...

Extbase is fun - truly truly... :D

Kind regards,

Henjo

Problems are small because we learned how to deal with them.
Problems are big because we need to learn how to deal with them.


On Sat, Feb 16, 2013 at 4:52 PM, Jan Kornblum <jan.kornblum at gmx.de> wrote:

> 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
>
>
>
> ______________________________**_________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc@**lists.typo3.org<TYPO3-project-typo3v4mvc at lists.typo3.org>
> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-**
> project-typo3v4mvc<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc>
>


More information about the TYPO3-project-typo3v4mvc mailing list