users@glassfish.java.net

RE: Re: Entity auto generated id

From: Jason Lee <lee_at_iecokc.com>
Date: Wed, 24 Jan 2007 10:41:32 -0600

You can probably file a change request on the spec, wherever that
tracker is. That way it's out there on file and someone will have to
address it one way or another. :) We do that with the JSF spec.
 
-----
Jason Lee, SCJP
JSF RI Dev Team
Programmer/Analyst
http://www.iec-okc.com <http://www.iec-okc.com/>
 


  _____

        From: Kenneth Clark [mailto:kenneth_at_rabiddog.co.za]
        Sent: Wednesday, January 24, 2007 10:39 AM
        To: users_at_glassfish.dev.java.net
        Subject: Re: Entity auto generated id
        
        
        Will provision ever be made for this type of thing or is there
just not enough demand for this type of functionality?
        
        
        
        Kenneth Clark
        Developer / Analyst
        
        Rabid Dog Laboratories (tm)
        Putting the art back into development
        
        tel: +27 11 475 7409
        mobile: +27 82 500 5090
        e-mail: kenneth_at_rabiddog.co.za
        website: http://www.rabiddog.co.za/


        Gordon Yorke wrote:

                Hello All,
                    There is no support in the JPA Specification for
pluggable Generation types. Only the 4 predefined types : TABLE,
SEQUENCE, IDENTITY, AUTO which represent popular database sequencing
methods.
                --Gordon
                
                -----Original Message-----
                From: legolas wood [mailto:legolas.w_at_gmail.com]
                Sent: Wednesday, January 24, 2007 11:16 AM
                To: users_at_glassfish.dev.java.net
                Subject: Re: Entity auto generated id
                
                
                Baker, Brad (Contr) wrote:
                  

                        This seems like a Data Base question. Not a
glassfish dev question.
                        
                        
                        
                        MS SQL will do auto gen GUIDs as PKs.
                        
                        
                        
                        -Brad
                        
                        
                        
                        ________________________________
                        
                        From: Kenneth Clark
[mailto:kenneth_at_rabiddog.co.za]
                        Sent: Wednesday, January 24, 2007 8:43 AM
                        To: users_at_glassfish.dev.java.net
                        Subject: Re: Entity auto generated id
                        
                        
                        
                        Is this even possible? Please help here. Been
sitting on this the whole
                        day and I just can't find docs on it. Should I
rather post this in the
                        forum?
                        
                        Thanks
                        
                        Kenneth Clark
                        Developer / Analyst
                        
                        Rabid Dog Laboratories (tm)
                        Putting the art back into development
                        
                        tel: +27 11 475 7409
                        mobile: +27 82 500 5090
                        e-mail: kenneth_at_rabiddog.co.za
                        website: http://www.rabiddog.co.za/
                        
                        
                        
                        Kenneth Clark wrote:
                        
                        This might be a really weird question so please
forgive me
                        
                        Is there anyway to auto generate a unique ID
using a custom routine for
                        the record?
                        
                        i.e.: I would like to use a GUID as the PK value
for an entity. Is this
                        possible?
                        
                        Thanks
                        
                        
                            

                
                Kenneth , What is your persistence mechanism ?
                in case that you are using EJB3 you can have your own
generator to generate your entity IDs.
                in case that you are using plain JDBC you can simply
generate the ID and put it into the column when you insert a row into
database.
                
        
---------------------------------------------------------------------
                To unsubscribe, e-mail:
users-unsubscribe_at_glassfish.dev.java.net
                For additional commands, e-mail:
users-help_at_glassfish.dev.java.net
                
                
        
---------------------------------------------------------------------
                To unsubscribe, e-mail:
users-unsubscribe_at_glassfish.dev.java.net
                For additional commands, e-mail:
users-help_at_glassfish.dev.java.net