ORM Help

11 views
Skip to first unread message

spiraldev

unread,
May 19, 2011, 1:19:04 PM5/19/11
to Object-Oriented Programming in ColdFusion
I am not sure that this is the right group to post this is but I'll
try anyways.

I am working with the CF9 ORM and I ran into some what of an issue
have the property set to be a generated uuid I think.

property name="userID" generated="insert" fieldtype="id" type="uuid"
generator="uuid";

The problem is that it is creating this string instead
402881e93008a8190130093ab2ee0001. Can anyone tell me what I am doing
wrong?

--Matt

Jeremy R DeYoung

unread,
May 19, 2011, 4:05:07 PM5/19/11
to coldfu...@googlegroups.com
Is your fieldtype Unique ID or is it integer?

if the userID fieldtype is integer try
property name="userID" generated="insert" fieldtype="id" type="numeric"
generator="identity";



--
You received this message because you are subscribed to the Google Groups "Object-Oriented Programming in ColdFusion" group.
To post to this group, send email to coldfu...@googlegroups.com.
To unsubscribe from this group, send email to coldfusionoo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/coldfusionoo?hl=en.


Matt Graf

unread,
May 19, 2011, 5:10:46 PM5/19/11
to coldfu...@googlegroups.com
I want the field to store a UUID.

Jeremy R DeYoung

unread,
May 19, 2011, 5:12:33 PM5/19/11
to coldfu...@googlegroups.com
what is your database type? mysql, mssql or other?

- - - - - - - - - - - - - - - - - 
Jeremy R. DeYoung 
Phone:615.261.8201 
 
RantsFromAMadMan.com 

Matt Graf

unread,
May 19, 2011, 5:16:05 PM5/19/11
to coldfu...@googlegroups.com
MS SQL  varchar(35)

Brett Herford-Fell

unread,
May 19, 2011, 6:16:47 PM5/19/11
to coldfu...@googlegroups.com

I did it manually because I couldn't get it to work.


<cfcomponent persistent="true" table="royalty"> 

    <cfproperty name="uuid" generator="assigned" fieldtype="id">

</cfcomponent>


and then in my code..


<cfset royalty = entityNew("royalty")> 

<cfset royalty.setUuid(uuid)> 

Reply all
Reply to author
Forward
0 new messages