Hi! Why do you want to save the basket at a specific technical occurrence such as .detach?
If you want, you can always persist changes for a "registered" user and on the other hand "never" persist them for "anonymous" users. Whenever the anonymous user becomes "registered" -> the basket is persisted. ** Martin 2008/6/11 Marcus Mattila <[EMAIL PROTECTED]>: > Hi! > > We are developing a shopping basket in our Wicket application. We > would like to persist the basket as late as possible, and for > anonymous users only if they sign up to the service. We don't want to > save lots of anonymous Baskets to the database. We use Wicket 1.3.3 > and Databinder (as a Hibernate "bridge"). What would be a good save > point for the Basket-object? > > One potential solution is this: > Override Session.detach() and save Basket there, if user is registered > and Basket is dirty.. > If user is anonymous, save when user has signed up and the User > -domain object is created. > > Possibly in the next version: > For anonymous users, create a cookiebased solution Amazon-style. > > Any glaring holes in our solution? Other ways of fulfilling this need? > > br, > Marcus > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
