Recess Developer Forums: Multi-column primary key - Recess Developer Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Multi-column primary key possible?

#1 User is offline   Daniel Icon

  • Group: Members
  • Posts: 11
  • Joined: 08-March 10

Posted 09 March 2010 - 03:45 AM

I like to have natural primary keys spanning across multiple columns to make rows unique instead of having one auto increment column without a real meaning.

As it stands you can only specify one column to be the primary key in a model's !BelongsTo annotation, right? Or is that just the impression i get when looking at the Recess Tools? At least the !Column annotation doesn't choke on having multiple columns as PrimaryKey.

So is this currently possible? If not, would it even be possible to include it? I wouldn't like it, if a framework dictated my database layout.
0

#2 User is offline   Thomaz Icon

  • Group: Members
  • Posts: 39
  • Joined: 28-August 09
  • LocationHeemskerk, The Netherlands

Posted 09 March 2010 - 04:04 AM

I think you should take a look at this:

http://github.com/nm...719dc200bd7e33d

It could be handy or not, but it's the only thing I could find.
Hoppa
0

#3 User is offline   Daniel Icon

  • Group: Members
  • Posts: 11
  • Joined: 08-March 10

Posted 09 March 2010 - 06:06 AM

View PostThomaz, on 09 March 2010 - 10:04 AM, said:

I think you should take a look at this: http://github.com/nm...719dc200bd7e33d

It could be handy or not, but it's the only thing I could find.

So it's currently not supported. But the changes in /database/sql/SqlBuilder.class.php look promising. Thanks for taking the time!

edit: Doesn't seem to work until the annotations make use of it.
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users