Yeah, something like that..I hadn't thought at all about the syntax. :-)

Larry


On 10/10/06, Jeff Butler <[EMAIL PROTECTED]> wrote:
Hi Larry,

If I understand correctly what your suggesting, I'm thinking we could do
something like this:

1. Put a Map in ThreadLocal in the SqlMapClient

2.  Add SqlMapCient methods like:
- clearThreadLocalMap()
- putThreadLocalData(String key, Object value)

3. Add some syntax to access these values in an SqlMap like this:
<insert id=InsertCustomer" class="customer">
  insert into customer (id, desc, audit_id)
  values (#id#, #desc#, #TL:audit_id#)
</insert>

Is that right?  That would certainly address my issue - and I think it would
be easier to implement that what I proposed.  I think I like it.

Jeff Butler





On 10/10/06, Larry Meadors <[EMAIL PROTECTED]> wrote:
> IMO, it doesn't fit with the iBATIS philosophy.
>
> There are as many solutions to this as there are projects, and making
> a simple solution to this problem is not terribly likely.
>
> I tend to put as much of that in the DAO (via threadlocal storage) or
> in the database itself (via triggers, etc) as I can. That keeps it out
> of the application pretty well. It might be cool to be able to get to
> static data from a mapped statement - so like if i create a static
> method on a ThreadLocal to get the user name, etc...
>
> Just my $0.02 on it. :-)
>
> Larry
>
>
>

Reply via email to