Sachin Aggarwal wrote:
> Shouldn't the finder methods that use non key attributes for search look in
> the memory if the entity was not found in the database .
>
> This ofcourse is relevant only in the case where the entity was created in
> the same transaction as the finder method invocation.
>
> I know this is tricky because this would require the container would have to
> do an sql kind of search in the memory based on the attributes of new
> created or newly updated entities.
>
> Is this a requirement as per the spec ?
>
> This seems to be a serious issue. If a method just added a new item to the
> shopping cart and wants to get all the items using a finder, then the new
> item needs to be retrieved by the finder so the total cost is correct?
>
> How is everybody solving the problem of new entities that have not been
> persisted in the database ?
>
> Sachin.
>
> p.s - the solution of updating the database on every update/insert or
> passing all the information along from one method to another does not seem
> viable.
Why do you need these two ops to be done in the same transaction? If you
did the create in one tx, and the find in another tx, then you would not
have the above problem.
/Rickard
--
Rickard �berg
@home: +46 13 177937
Email: [EMAIL PROTECTED]
Homepage: http://www-und.ida.liu.se/~ricob684
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".