[Lift] Duplicate Keys Created by Schemefier

2009-12-15 Thread Peter Robinett
My tables created by Schemefier have multiple keys for the primary key
when my Mapper model is declared like so: class myModel extends
LongKeyedMapper[myModel] with IdPK. There is naturally the primary key
but there is also a unique key on the column that simply duplicates
the functionality of the primary key.

Are other people seeing this? I've only looked on MySQL. This seems to
be because IdPK adds an id of type MappedLongIndex. Only the
longIndexColumnType of MySqlDriver has UNIQUE KEY in its definition.
Unique keys are great but, as I mentioned, if the column is also the
primary key the index is a duplication. Maybe this is something that
IdPK can disable when declaring the column? At least with MySQL
primary keys are guaranteed to be unique and InnoDB tables, which
Mapper uses, can have issues with long primary keys[1].

Should this be fixed? Or is the more helpful answer 'Don't use
MySQL'? ;-)

Peter

[1]: http://dev.mysql.com/doc/refman/5.1/en/innodb-index-types.html

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.




Re: [Lift] Duplicate Keys Created by Schemefier

2009-12-15 Thread David Pollak
On Tue, Dec 15, 2009 at 5:46 PM, Peter Robinett pe...@bubblefoundry.comwrote:

 My tables created by Schemefier have multiple keys for the primary key
 when my Mapper model is declared like so: class myModel extends
 LongKeyedMapper[myModel] with IdPK. There is naturally the primary key
 but there is also a unique key on the column that simply duplicates
 the functionality of the primary key.

 Are other people seeing this? I've only looked on MySQL. This seems to
 be because IdPK adds an id of type MappedLongIndex. Only the
 longIndexColumnType of MySqlDriver has UNIQUE KEY in its definition.
 Unique keys are great but, as I mentioned, if the column is also the
 primary key the index is a duplication. Maybe this is something that
 IdPK can disable when declaring the column? At least with MySQL
 primary keys are guaranteed to be unique and InnoDB tables, which
 Mapper uses, can have issues with long primary keys[1].

 Should this be fixed? Or is the more helpful answer 'Don't use
 MySQL'? ;-)


I would use MySQL for a production site.

If IdPK isn't doing what you want, then don't use it, just declare the
primary key field manually.



 Peter

 [1]: http://dev.mysql.com/doc/refman/5.1/en/innodb-index-types.html

 --

 You received this message because you are subscribed to the Google Groups
 Lift group.
 To post to this group, send email to lift...@googlegroups.com.
 To unsubscribe from this group, send email to
 liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.





-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.




Re: [Lift] Duplicate Keys Created by Schemefier

2009-12-15 Thread Ross Mellgren
On Dec 15, 2009, at 10:23 PM, David Pollak wrote:
 On Tue, Dec 15, 2009 at 5:46 PM, Peter Robinett pe...@bubblefoundry.com 
 wrote:
 Should this be fixed? Or is the more helpful answer 'Don't use
 MySQL'? ;-)
 
 I would use MySQL for a production site.

Did you mean wouldn't?

-Ross

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.




Re: [Lift] Duplicate Keys Created by Schemefier

2009-12-15 Thread David Pollak
On Tue, Dec 15, 2009 at 7:33 PM, Ross Mellgren dri...@gmail.com wrote:

 On Dec 15, 2009, at 10:23 PM, David Pollak wrote:

 On Tue, Dec 15, 2009 at 5:46 PM, Peter Robinett 
 pe...@bubblefoundry.comwrote:

 Should this be fixed? Or is the more helpful answer 'Don't use
 MySQL'? ;-)


 I would use MySQL for a production site.


 Did you mean wouldn't?


Yes, I meant wouldn't



 -Ross

  --
 You received this message because you are subscribed to the Google Groups
 Lift group.
 To post to this group, send email to lift...@googlegroups.com.
 To unsubscribe from this group, send email to
 liftweb+unsubscr...@googlegroups.comliftweb%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/liftweb?hl=en.




-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--

You received this message because you are subscribed to the Google Groups 
Lift group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.