PK and FK?

21 views
Skip to first unread message

jesdynf

unread,
Jan 20, 2015, 1:44:05 PM1/20/15
to cf-or...@googlegroups.com
Having trouble defining a table in Railo.

I've got three tables, users and items and my shopping cart. Users and items are both PKs on UserID and ItemID respectively, autogenerated ids, nothing exotic.

The shopping cart's key is a composite made up of UserID and ItemID. The application already exists so I can't follow some StackOverflow advice and create some sort of surrogate key, ORM is being fit onto the existing application.

How do I tackle this? I can't even work out what the fieldtype should be, since "id" and "many-to-one" both apply.

Thanks!

Michael Zock

unread,
Jan 21, 2015, 12:59:56 PM1/21/15
to cf-or...@googlegroups.com
Take a look at the topmost answer in http://stackoverflow.com/questions/1956473/how-to-map-this-link-table-in-cf-orm and the additional details in the thread it refers to.

jesdynf

unread,
Jan 22, 2015, 12:49:35 PM1/22/15
to cf-or...@googlegroups.com
On Wednesday, January 21, 2015 at 11:59:56 AM UTC-6, Michael Zock wrote:

> Take a look at the topmost answer in http://stackoverflow.com/questions/1956473/how-to-map-this-link-table-in-cf-orm and the additional details in the thread it refers to.

It can take a /list/?! Did I miss where that was documented?

Thanks!

Cameron Childress

unread,
Jan 22, 2015, 1:10:07 PM1/22/15
to cf-or...@googlegroups.com
On Thu, Jan 22, 2015 at 12:49 PM, jesdynf wrote:
It can take a /list/?! Did I miss where that was documented?

Yes, did you view the StackOverflow answer? That is what it shows. 

It shows two properties, both with a fieldtype of "ID". It's saying "these columns, combined, are the PK".

-Cameron

--
Cameron Childress
--
p:   678.637.5072
im: cameroncf

jesdynf

unread,
Jan 23, 2015, 12:50:39 PM1/23/15
to cf-or...@googlegroups.com
On Thursday, January 22, 2015 at 12:10:07 PM UTC-6, Cameron Childress wrote:

>> It can take a /list/?! Did I miss where that was documented?
>
> Yes, did you view the StackOverflow answer? That is what it shows. 

Yeah, Camereon, I did view the SO answer -- that's why I was so incredulous. I'd never heard a whisper before of that property taking a /list/ of settings.

Cameron Childress

unread,
Jan 23, 2015, 1:19:24 PM1/23/15
to cf-or...@googlegroups.com
On Fri, Jan 23, 2015 at 12:50 PM, jesdynf <jes...@gmail.com> wrote:
Yeah, Camereon, I did view the SO answer -- that's why I was so incredulous. I'd never heard a whisper before of that property taking a /list/ of settings.

I think I read your message as asking "Can it take a list?" instead of what you actually said which was "It can take a list?".

My reaction was "YES!!! It is staring you in the face right there! How can you not see it?!?!?" But as it turns out you did see it all along... 

Sorry :)

-Cameron 
Reply all
Reply to author
Forward
0 new messages