Tim,

<vendor>

I posted the following to our news group:

        news://newsgroups.borland.com/inprise.public.appserver

"Jonathan K. Weedon" wrote:
>
> I am starting this thread to promote a discussion of how
> IAS 4.1 should handle the automatic generation of primary
> key values.  Although there are general purpose ways to
> support this feature in the EJB model (see my posting:
>
>         Sequence Number Generator
>
> for details) it is a frequently enough requested feature
> that it deserves inclusion in the CMP engine proper.
>
> Note that by definition support for this feature goes beyond
> the scope of the EJB specification.  IMO, this is a bug in
> the EJB spec., but for now, caveat emptor.
>
> So, if you have used a particular technique successfully,
> please let us know.  If you think you know how to solve the
> problem for a particular DBMS, let us know.  I hope to get
> this issue fully resolved and implemented this week.  So,
> time is obviously of the essence.
>
> -jkw

under the thread:

        CMP primary key generation

Since this feature is IAS specific, please do not reply to
this mailing list, but rather to the IAS news group.  Thanks.

</vendor>

-jkw

Tim Shaw wrote:
>
> Hi,
>
> Sorry if this is vendor specific, but it's an odd one in a not very odd
> combination :
>
> Environment : IAS 4.0, SQL Server 7, NT
>
> I have a legacy DB we're wrapping with EJB's etc - C/S -> n-Tier
>
> The DB has a PK on each table which has the (SQLServer specific?) keyword
> 'IDENTITY' attached to it. My understanding of this is that it creates a new
> PK for every insert - which is actually kinda neat as it circumvents the
> need to generate one ourselves.
>
> The problem I have is that IAS, when using CMP, generates code to insert a
> (null - because it doesn't have a value) value into the PK - but SQL Server
> doesn't like this and throws an Exception. This (sort of) makes sense as the
> CMP will not know about the IDENTITY thing and assume we know what we're
> doing with the PK from within the bean.
>
> I'm currently waiting for Inprise to come back on this, but I wondered if
> anyone had run across this before (or had any suggestions).
>
> I can't turn off the IDENTITY as other apps update the DB, and I really
> don't want to go to BMP as it fits nicely into CMP otherwise. Can I 'hide'
> the field from the CMP somehow?
>
> Thanks in advance
>
> tim
>
> This e-mail, and any attachment, is confidential. If you have received it in error, 
>please delete it from your system, do not use or disclose the information in any way, 
>and notify me immediately. The contents of this message may contain personal views 
>which are not the views of the BBC, unless specifically stated.
>
> ===========================================================================
> 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".

===========================================================================
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".

Reply via email to